Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
evo AjaxSearch
Вызов формы
[!AjaxSearch? &ajaxSearch=`0` &landingPage=`22` &tplInput=`search_form` &parents=`in:5` &tplResult=`search_result` &showResults=`0`!]
Страница поиска
<ul class="search_list">[!AjaxSearch? &ajaxSearch=`0` &parents=`in:5` &pagingType=`0` &showInputForm=`0` &tplResult=`search_result` &extractLength=`500` &grabMax=`10` &showInputForm=`0` !]</ul>
чанк search_form
<div class="navSearch">
<a href="/?s=" id="NavSearchLink"><span class="entypo entypo-search"></span></a>
[+as.showInputForm:is=`1`:then=`
<form class="head-search" id="NavSearchForm" action="[+as.formAction+]" method="post">
[+as.showAsId:is=`1`:then=`<input type="hidden" name="[+as.asName+]" value="[+as.asId+]" />`+]
<input class="form-control" type="hidden" name="advsearch" value="[+as.advSearch+]" placeholder="Поиск..." />
<div class="input-group">
<input id="[+as.inputId+]" class="form-control cleardefault" type="text" name="search" value="[+as.inputValue+]"[+as.inputOptions+] />
[+as.liveSearch:is=`0`:then=`
<span class="input-group-btn">
<button class="btn btn-primary" type="submit"><i class="fa fa-search" aria-hidden="true"></i></button>
</span>
`:else=`
<div class="input-group-addon"><i class="fa fa-search"></i></div>
`+]
</div>
</form>
`+]
</div>
чанк search_result
<li class="search_item">
<div class="title"><a href="[+as.resultLink+]">[+as.pagetitle+]</a></div>
<div class="text">[+as.extract+]</div>
<a class="more" href="[+as.resultLink+]">Подробнее</a>
</li>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment