форум общения русскоязычных пользователей CMS Текстпаттерн
Вы не зашли.
Вот недавно поставил txp. Разбираюсь... )
Как сделать, чтобы при нулевой выдаче в поиске сообщалось что-то типа "Ничего не найдено" и к примеру ниже архивы появлялись?
Спасибо.
Неактивен
<txp:if_search><txp:article pgonly="1" limit="10" /><txp:if_search_results><h3><txp:text item="search_results" />: <txp:page_url type="q" /></h3><br /><txp:else /><p>Извините, по вашему запросу: <strong>"<txp:search_term />"</strong> - ничего не найдено.</p><h4>Вы можете прочитать другие статьи</h4> <div id="older"> <txp:article_custom id="256,407,615,643,507" form="extra2"/> </div></txp:if_search_results></txp:if_search>
У меня вот так сделано
Неактивен
Не пашет. Это нужно в форму search_results добавить?
Redduck написал:
Код:
<txp:if_search><txp:article pgonly="1" limit="10" /><txp:if_search_results><h3><txp:text item="search_results" />: <txp:page_url type="q" /></h3><br /><txp:else /><p>Извините, по вашему запросу: <strong>"<txp:search_term />"</strong> - ничего не найдено.</p><h4>Вы можете прочитать другие статьи</h4> <div id="older"> <txp:article_custom id="256,407,615,643,507" form="extra2"/> </div></txp:if_search_results></txp:if_search>У меня вот так сделано
Неактивен
У меня вот так
страница:
<txp:output_form form="head" /> <body> <div id='wrapper'> <txp:output_form form="header" /> <txp:output_form form="menu" /> <div id="content"> <div id="innercontent"> <txp:output_form form="content" /> </div> </div> <txp:output_form form="sidebar" /> <div id="footm"></div> </div> <txp:output_form form="footer" /> </body> </html>
Часть формы content, тип article (начало формы)
<txp:if_individual_article> <txp:article form="single" allowoverride="0"/> <txp:output_form form="comments_display" /> <txp:else /> <txp:if_section name=",articles"> <txp:if_search><txp:article pgonly="1" limit="10" /><txp:if_search_results><h3><txp:text item="search_results" />: <txp:page_url type="q" /></h3><br /><txp:else /><p>Извините, по вашему запросу: <strong>"<txp:search_term />"</strong> - ничего не найдено.</p><br /><br /><br /></txp:if_search_results></txp:if_search> <txp:article allowoverride="0" form="extra" section="articles" limit="5" pgonly="0" searchall="0" searchsticky="0" sort="Posted desc" status="4" /> <txp:ob1_pagination firsttext="«" previoustext="<" nexttext=">" lasttext="»" ulclass="pagination" liselected="active" /> <div class="clear"></div>
Документация:
http://textpattern.net/wiki/index.php?t … ch_results
Отредактированно Redduck (23-05-2012 13:59:45)
Неактивен
Спасибо. Буду разбираться.
Неактивен
Разобрался! Redduck спасибо)
Неактивен