ecshop 中的href="{$ecs_css_path}",这个样式是在哪定义的,怎么找不到呢?这是怎么用的?谁能告诉一下?

html-css09

ecshop 中的href="{$ecs_css_path}",这个样式是在哪定义的,怎么找不到呢?这是怎么用的?谁能告诉一下?,第1张

你网站的includes里的init.php的187-194行

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" />