PHPCMS标签整理
首页(index.html)调取
栏目的网址
{$CATEGORYS[ 栏目ID][url]}
如:
1 |
<a href="{$CATEGORYS[25][url]}" target="_blank" title="更多">更多</a> |
内容页(show.html)调取
栏目信息:
1 2 3 4 5 6 |
//栏目ID {$catid} //栏目名称 {$CATEGORYS[$catid][catname]} //栏目URL {$CATEGORYS[$catid][url]} |
频道页(category.html)
跳转到第一个子栏目列表页的方法:
category.html模板写成:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"/> <title>{if isset($SEO['title']) && !empty($SEO['title'])}{$SEO['title']}{/if}{$SEO['site_title']}</title> </head> <body> <script language="javascript" type="text/javascript"> {pc:content action="category" catid="$catid" num="1" siteid="$siteid" order="listorder ASC"} {loop $data $r} location_url = "{$r[url]}"; window.location.href = location_url; {/loop} {/pc} </script> </body> </html> |