聯(lián)系官方銷(xiāo)售客服
1835022288
028-61286886
關(guān)鍵詞或者是tag詞能不能讀取自定義的字段。
比如我在內(nèi)容頁(yè)自定義了一個(gè)tag標(biāo)簽的字段,我想讀取我自定義標(biāo)簽字段的內(nèi)容并鏈接顯示tag詞顯示出來(lái)。使用的是下面的代碼:
{tag tag=$tagbiaoqian num=20}
<a href="{$t.url}" title="{$t.name}">{$t.name}</a>
{/tag}
第一個(gè)問(wèn)題:如果我想不管tag庫(kù)中有沒(méi)有都顯示并鏈接出來(lái)怎么實(shí)現(xiàn)?
第二個(gè)問(wèn)題:tag列表顯示只能顯示指定的一個(gè)模塊內(nèi)容,如果我有多個(gè)共享模塊的內(nèi)容想通過(guò)tag都顯示出來(lái),怎么實(shí)現(xiàn)?
{related module=news tag=$tag.tags page=1 pagesize=10} 這個(gè)只能關(guān)聯(lián)news模塊的,我想顯示其它的比如共享模塊cmo和tmp模塊的能實(shí)現(xiàn)嗎?
{tag tag=$tagbiaoqian num=20}不支持傳遞參數(shù)的寫(xiě)法
{related module=news tag=$tag.tags page=1 pagesize=10}
如果想在tag頁(yè)顯示二個(gè)共享模塊關(guān)聯(lián)的tag詞,只能是一個(gè)個(gè)寫(xiě)。不能在module=news后面加模塊名稱嗎?不支持多模塊?比如module=news,cmo這種寫(xiě)法?
對(duì),不支持多模塊,一個(gè)頁(yè)面下最好只寫(xiě)一個(gè)分頁(yè)標(biāo)簽
回復(fù)@迅??蚣苈?lián)合創(chuàng)始人 tag不支持多個(gè)模塊,那能指定一個(gè)模塊對(duì)應(yīng)一個(gè)tag么?比如我新聞模塊news指定一個(gè)tag頁(yè)調(diào)用news模塊里的內(nèi)容。產(chǎn)品模塊pro調(diào)用產(chǎn)品內(nèi)容。
已經(jīng)按http://m.223987.com/wenda/51506.html這個(gè)頁(yè)面@diskson的完美解決tag和搜索不能全部模塊的問(wèn)題。
{php $module = [];}
{cache name=module-content return=m}
{php $module[] = $m.dirname;}
{/cache}
{php $modules = implode(',', $module);}
{modules module=$modules field=title,url,thumb,description,keywords,updatetime,catid LIKE_title=$keyword order=updatetime page=1 pagesize=10 urlrule=$urlrule}
文檔鏈接{$t.url}
文檔標(biāo)題{$t.title}
{/modules}
分頁(yè)條
{$pages}
這個(gè)我在tag頁(yè)和搜索頁(yè)都已經(jīng)成功解決問(wèn)題!