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')
}
假设你需要修改的模板文件为index.dwt,你想在这个文件中载入同目录下的CSS文件common.css,操作步骤:打开index.dwt这个模板文件,然后将下面代码加入到</head>前:<link href="common.css" rel="stylesheet" type="text/css" />
ecshop自带的样式代码为:<link href="{$ecs_css_path}" rel="stylesheet" type="text/css" />