html>
可能你会注意到了index.tpl 只有一行{$HOOK_HOME}。这里是因为index文件只在homepage上显示我们所指定的模块,我们的目录还有产品页将会显示其它的模块。
当然,你可能也会发现我们每个页面都有一个不同的body id,方便了我们用css去定义他们单独的每个页面,或许你以后还想在body上加上些class,那么这句是从哪句代码得来的呢?看看header.tpl,这段代码就是用来实现它的:
body {if $page_name} id="{$page_name|escape:'htmlall':'UTF-8'}"{/if}> and it is this code that gets the page name. So category.tpl will have the body id="category">