D
D
Dmitry Grabko2017-10-02 16:29:46
MODX
Dmitry Grabko, 2017-10-02 16:29:46

How to pass TV parameters to the search result?

I use the AjaxSearch snippet on the site, with Ajax disabled. On the result page, I display the results of the search by template.
Result page:

[!AjaxSearch? &ajaxSearch=`0` &output=`1` &tplResult=`MainSearchResult-tpl` &grabMax=`20` &extract=`99:id,sale_tovar,1_september,23_tovar,8_tovar,8j_tovar,tovar-today,photo,articule,pagetitle,price`!]
[+as.inputForm+]
[+as.pagetitle+]
[+as.tv_price+]
[+as.results+]

Template for results:
<a href="[~[+as.id+]~]">
  <div class="tovar">
    <div class="t_img">
      
      
      
      
      
      
      <img src="[+tv.photo+]" />
    </div>
    <div class="t_name">
      <span>Артикул: [+as.tv.articuleShow+]</span>
      <p>[+as.pagetitle+]</p>
    </div>
    <div class="down_block">
      <div class="t_price">
        <p>Цена: [+as.tv_price+] P</p>
      </div>
      <a class="zakaz" alt="[+pagetitle+] (арт:[+tv.articule+])"  data-img="[+tv.photo+]">
        Заказать
      </a>
    </div>
  </div>
</a>

As a result of the search, it turned out to display only Pagetitle . How to transfer the values ​​of your own TV parameters to the search results?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question