The method of implementing classified search in zblog

web front end ten thousand four hundred and thirteen 10 years ago (2014-02-26)

zblog There are many ways to implement classified search (nonsense), and the common one is classified search in the application center plug-in unit , after installing and enabling, set the generated code, which can be written to the sidebar or placed theme Used in documents; The other method is to implement classification search by YTCMS. The code is as follows:

 <form methpd="get" action="<#ZC_BLOG_HOST#>search. ASP "> <select name="cate" > <option value="0">All classifications</option> {for i=1 ubound(Categorys)} <option value="&#123;&#36;Categorys(i). ID&#125; " >&#123;&#36;Categorys(i). Name&#125;</option> {if i=6}{eval exit for}&#123;/ if&#125; &#123;/ next&#125; </select> <input name="q" type="text" id="q" /> <input type="submit" value="search" name="btnPost" id="btnPost"/> </form>

The above codes can get the first 6 categories and jump out of the loop (if you get n categories, you can set i=6 as i=n), or you can modify it to the specified category as needed.