Stylesheet settings, need them to be relative
Stylesheet settings, need them to be relative
How do I set the stylesheets to a relative path?
Re: Stylesheet settings, need them to be relative
Stylesheets are usually entered into the database, so you don't need a path. If you are using external stylesheets, you need to put the path from the root /.
Nullig
Nullig
Re: Stylesheet settings, need them to be relative
The stylesheet is set in the template as {{stylesheet}}
which loads all the stylesheets. It takes its url setting from the config.php file.
The confg file sets the 'root' url for your site... its then subsequently uses, obviously by the stylesheet call
to explicity set the stylesheets.
$config['root_url'] = 'http://localhost/iran';
Because I use both localhost, and an external ip to expose to clients, I need my stylesheet path to be relative.
Do you know how to accomplish this task?
which loads all the stylesheets. It takes its url setting from the config.php file.
The confg file sets the 'root' url for your site... its then subsequently uses, obviously by the stylesheet call
to explicity set the stylesheets.
$config['root_url'] = 'http://localhost/iran';
Because I use both localhost, and an external ip to expose to clients, I need my stylesheet path to be relative.
Do you know how to accomplish this task?
Last edited by violetweb on Fri Oct 03, 2008 6:48 pm, edited 1 time in total.
Re: Stylesheet settings, need them to be relative
The regular CMSMS stylesheets are in the database. They are not separate, external files.
Nullig
Nullig
Re: Stylesheet settings, need them to be relative
You can try to use something like this:
Code: Select all
if($_SERVER['SERVER_ADDR']=='127.0.0.1'){
$config['root_url'] = 'http://localhost/iran';
}else{
$config['root_url'] = 'http://198.111.2.3/'; // IP ADDRESS
}