문제

How can I create a widget with its own images to use in any project? I created an "images" folder inside the widget project and now I want to get the path without changing it on every project.

The structure is: ../widgets/WidgetFolderName/images/foo.png

I tried WPATH('images/foo.png') but didn't work.

도움이 되었습니까?

해결책

As you can see in Alloy_Widgets documentation, it searches on the assets folder or the lib folder.

Create the assets folder on the root and move there my images folder and leave unchanged the WPATH path.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top