Joomla 3.2.3
Hi all, I am trying to develop a plugin for Joomla (just for myself) and I have run into a problem.
Basically, the plugin searches for the URL linking to the local copy of bootstrap.min.css which is:
/media/jui/css/bootstrap.min.css
This is then replaced by a CDN version of the Bootstrap CSS.
Everything works fine when the website is located in the root of the domain but if the website is in a subdirectory then the link changes to:
/subdirectory/media/jui/css/bootstrap.min.css
And the plugin stops loading the CDN version.
Is there a PHP based way to determine if the website is being hosted in a subdirectory?
Thanks
the constant JPATH_BASE gives the base directory Joomla is installed in:
http://docs.joomla.org/How_to_find_your_absolute_path
This points to the directory the index.php is located in. Which parses all requests to the joomla installation.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.