Domanda

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.

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top