File structure is as follows:
index.php
settings/
|-manage_account.php
templates/viriditio-v2/
|-index.tpl
templates/virditio-v2/css
|-style.css
localhost/~braden/virditio/index.php
shows the template like expected showing index.tpl with the style sheet paths correctly showing:
<link rel="stylesheet" href="templates/virditio-v2/css/style.css" type="text/css"/>
However localhost/~braden/virditio/settings/manage_account.php
shows the same path, which is the relative path (should be ../ to be complete).
What's an easy way to make it relative to the template? Or absolute to the root? Is there a Smarty function that includes css files and makes them not relative?
Currently I have it set like this:
config:
template_url = "templates/virditio-v2/"
and .tpl:
<link rel="stylesheet" href="{#template_url#}css/reset.css" type="text/css"/>
EDIT
It's not pretty but I was able to accomplish it with
{assign var='config_url' value=#template_url#}
{assign var='template_url' value=http://`$smarty.server.SERVER_NAME`$config_url}
Any better solutions out there?