Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By sparkerb
#813946
Hi ,1st time posting! Im sure this is a simple one. I have created a new plugin. I need to reference a css file. I have placed it in the public_html folder created by the wizard and have used the url detailed in the instructions. I've tried putting it in the root where the PLUGIN_NAMEApplication.html is. No joy. Any help would be appreciated.
By AlanBueno
#813960
Each plugin has their own internal public_html folder where you can store your files instead of putting them in the workflow/public_html, to access these folders you can use relative directories in your URL's
For example:
Code: Select all
<link type="text/css" href="../engine/plugins/{pluginName}/{pluginName}/public_html/main.css" />

However, the correct way to access plugin files is using the PATH_PLUGINS constant, for example:
Code: Select all
<link type="text/css" href="PATH_PLUGINS.'{pluginName}/{pluginName}/public_html/main.css');
By pritisinghip
#813974
Retrieves the absolute URL to the plugins or mu-plugins directory (without the trailing slash) or, when using the $path argument, to a specific file under that directory. You can either specify the $path argument as a hardcoded path relative to the plugins or mu-plugins directory, or conveniently pass __FILE__ as the second argument to make the $path relative to the parent directory of the current PHP script file.
Want to create your own meme coin?

In the world of cryptocurrencies, a unique and exc[…]

The market for cryptocurrencies is demonstrating a[…]

What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

Hello. For rental housing, there are software solu[…]