How to retrieve plugin path and absolute url?

Asked by jsherk

I noticed that I can retreive the path and name of the current menu with

I don't see an easy way to get the plugin directory easily? I wrote a little function to extract it from menuFile but just wondering if there is an easy function that I missed

Also, what about retrieving the absolute path? I know you can use $configuration['absolute_path'] but the variable is not available from within a class/function. Should I just set global $configuration; to make it available within my class/function?


Question information

English Edit question
PHPDevShell Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
TitanKing (titan-phpdevshell) said :



To get the absolute url, simply do:

To get active plugin simpl do plugin:


Revision history for this message
jsherk (jeff-forerunnertv) said :

and this:

both give me the same result. I am not sure if they were supposed to or not.

This gives the absolute URL
but I wanted the absolute path.
I realized that all configuration variables are available thru $this so I can use this:
and don't have to declare: global $configuration

Does this $this->core->activePlugin(); give the plugin folder name or the name of the plugin as specified in the plugin.config file?


Can you help with this problem?

Provide an answer of your own, or ask jsherk for more information if necessary.

To post a message you must log in.