PDA

View Full Version : Search tabs code



Aleksandar Apostolovski
May 30, 2019, 10:25 AM
Where can I find the code for the search tabs?

Rudi
May 30, 2019, 10:49 AM
Hello,

What exactly you need to do ?

and what code: php or html ?

Aleksandar Apostolovski
May 30, 2019, 10:58 AM
Php, because I would like to assign a icon for the search tabs.
Can you help me to assign a icon per tab?
If search tab is "Патнички" show a icon instead of "Патнички".

Aleksandar Apostolovski
May 30, 2019, 11:02 AM
I've managed to do this as a test through Inspect (see the attach) but I want to do it now in the code :)

Aleksandar Apostolovski
May 30, 2019, 12:33 PM
I assume it's in /templates/rmk/tpl/controllers/search.tpl ?
This code has to be edited:
<!-- tabs -->
<ul class="tabs tabs-hash">
{if $search_forms|@count > 0}
{foreach from=$search_forms item='search_form' key='sf_key' name='sformsF'}
{assign var='tab_phrase' value='listing_types+name+'|cat:$listing_types[$sf_key].Key}
<li {if $smarty.foreach.sformsF.first}class="{if $smarty.foreach.sformsF.first && !$keyword_search}active{/if}"{/if} id="tab_{$sf_key|replace:'_':''}">
<a href="#{$sf_key}" data-target="{$sf_key|replace:'_':''}">{$lang[$tab_phrase]}</a>
</li>
{/foreach}
{/if}
{assign var='ks_phrase' value='blocks+name+keyword_search'}
<li {if $keyword_search || !$search_forms}class="active"{/if} id="tab_keyword">
<a href="#keyword" data-target="keyword">{$lang.$ks_phrase}</a>
</li>
</ul>
<!-- tabs end -->

Aleksandar Apostolovski
May 30, 2019, 05:09 PM
Anyone that could help for the code?

Rudi
May 30, 2019, 05:22 PM
This file is horizontal_search.tpl from /blocks

you should replace {$search_form.name} at the top:

with the following code:


{if $search_form.listing_type == 'LISTING_TYPE_KEY'}
<img src="IMG_URL" />
{elseif $search_form.listing_type == 'LISTING_TYPE_KEY'}
<img src="IMG_URL" />
...

{/if}



;)

Aleksandar Apostolovski
May 30, 2019, 06:02 PM
Rudi thank you very much!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!