Smarty Relative include path

asdfgb

New Member
File structure is as follows:\[code\]index.phpsettings/|-manage_account.phptemplates/viriditio-v2/|-index.tpltemplates/virditio-v2/css|-style.css\[/code\]\[code\]localhost/~braden/virditio/index.php\[/code\] shows the template like expected showing index.tpl with the style sheet paths correctly showing:\[code\]<link rel="stylesheet" href="http://stackoverflow.com/questions/3780784/templates/virditio-v2/css/style.css" type="text/css"/>\[/code\]However \[code\]localhost/~braden/virditio/settings/manage_account.php\[/code\] 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:\[code\]template_url = "templates/virditio-v2/"\[/code\]and .tpl:\[code\]<link rel="stylesheet" href="http://stackoverflow.com/questions/3780784/{#template_url#}css/reset.css" type="text/css"/>\[/code\]EDITIt's not pretty but I was able to accomplish it with \[code\]{assign var='config_url' value=http://stackoverflow.com/questions/3780784/#template_url#}{assign var='template_url' value=http://`$smarty.server.SERVER_NAME`$config_url}\[/code\]Any better solutions out there?
 
Back
Top