文件位置ECSHOP根目錄\includes\init.php
在 $smarty->assign('ecs_charset', EC_CHARSET);
下面增加 $smarty->assign('template_dir', 'themes/' . $_CFG['template']);
在模板中就直接調用
可以參考下面的css調用的方法:
if (!empty($_CFG['stylename']))
{
$smarty->assign('ecs_css_path', 'themes/' . $_CFG['template'] . '/style_' . $_CFG['stylename'] . '.css');
}
else
{
$smarty->assign('ecs_css_path', 'themes/' . $_CFG['template'] . '/style.css');
}
{$ecs_css_path}
{$template_dir}
就OK了.