ecshop 定义模板路径

文件位置ECSHOP根目录\includes\init.phpphp

在 $smarty->assign('ecs_charset', EC_CHARSET);
下面增长  $smarty->assign('template_dir', 'themes/' . $_CFG['template']);
在模板中就直接调用
能够参考下面的css调用的方法:css

 if (!empty($_CFG['stylename']))ide

    {spa

        $smarty->assign('ecs_css_path', 'themes/' . $_CFG['template'] . '/style_' . $_CFG['stylename'] . '.css');orm

    }it

    else模板

    {class

        $smarty->assign('ecs_css_path', 'themes/' . $_CFG['template'] . '/style.css');方法

    }smarty

{$ecs_css_path}

{$template_dir}

就OK了.

相关文章
相关标签/搜索