聯(lián)系官方銷售客服
1835022288
028-61286886
Tag 循環(huán)標(biāo)簽如何 分頁?
{cache name=module-content return=c} {related module=$c.dirname tag=$tag.tags num=30} <a href="{$t.url}">{$t.title}</a> {/related} {/cache}
tag列表頁用的上面的代碼調(diào)用的,我試著加了下分頁的參數(shù),但是貌似路由里沒有tag的分頁規(guī)則設(shè)置的地方。
index.php?s=tag&name=hua
這是動(dòng)態(tài)的URL,
{related module=$c.dirname tag=$tag.tags page=1 pagesize=10 urlrule=index.php?s=tag&name=$get.name&page=[page]}
page=1 pagesize=10 urlrule=index.php?s=tag&name=$get.name&page=[page]
加了這幾個(gè)參數(shù)。動(dòng)態(tài)URL下可以分頁了,偽靜態(tài)路由自己到 文件里配置重寫嗎?
index.php?s=tag&name=chuntian&page=3
還是沒辦法將前天頁面的動(dòng)態(tài)URL 重寫偽靜態(tài),怎么弄呢? 有知道的大神沒
config/rewrite.php
<?ph $rule ="tag-".$get.name."-[page].html"; ?>
{related module=$c.dirname tag=$tag.tags page=1 pagesize=10 urlrule=$rule}
你這個(gè)循環(huán)體里面分頁啊,我覺得不現(xiàn)實(shí),因?yàn)橐粋€(gè)頁面只能有一個(gè)分頁標(biāo)簽
循環(huán)外分頁,我看了你剛剛的回復(fù),不需要自定義分頁函數(shù)嗎?