POST TIME:2018-02-04 22:29
針對企業(yè)網(wǎng)站,特別是很多產(chǎn)品類別的企業(yè)網(wǎng)站,需要對欄目類別進行選項搜索。dede仿企業(yè)站很多人遇到的問題也就是企業(yè)網(wǎng)站中的產(chǎn)品類型太多。客戶需要選擇欄目類別進行定點搜索;那么這樣的dede標簽怎么寫呢?下面我們來看看一個客戶的案列是怎么寫的吧。
<form action="{dede:field name='phpurl'/}/search.php" name="formsearch">
<div class="form">
<input type="hidden" name="kwtype" value="0" />
<input name="keyword" type="text" class="search-keyword" id="search-keyword" />
<select name="typeid" class="search-option" id="typeid"> <option value='0' selected='1' class="search-xl">全部欄目</option> {dede:channelartlist typeid='top' } {dede:type} <option value='[field:id/]'>[field:typename/]</option>{/dede:type} {dede:channel type='son' noself='yes'} <option value='[field:id/]'>-[field:typename/]</option> {/dede:channel} {/dede:channelartlist} </select>
<button type="submit" class="search-submit">站內(nèi)搜索</button>
</div>
</form>
上面的標簽使用到了channelartlist ,他可以調(diào)用出頂級欄目和子欄目