ssacom 0 Posted May 27, 2011 Report Share Posted May 27, 2011 К примеру выбрали сортировку - "цена по возрастанию" и идеале как то должно показывать что сейчас сортировка именно такая. Как то ее облачить в какой то тег типа <span>цена по возрастанию</span> Кто нибудь делал? Где копать? Quote Link to post Share on other sites
support 446 Posted May 27, 2011 Report Share Posted May 27, 2011 По умолчанию нет кода для выделения. Разве что может в /includes/modules/default.php писать свой код. Quote Link to post Share on other sites
shaklov 63 Posted May 27, 2011 Report Share Posted May 27, 2011 Через url страницы ведь можно получить параметр и в смарти вставить. Ищем вот это "sort=price&direction=asc" и назначаем класс. Было на форуме: http://vamshop.ru/forum/topic/7109-как-выделить-в-шаблоне-выбранный-параметр-сорт/page__p__60378__hl__sort%3Dprice__fromsearch__1#entry60378 Quote Link to post Share on other sites
ssacom 0 Posted May 28, 2011 Author Report Share Posted May 28, 2011 то есть получается такая конструкция? вроде работает но мало ли ) <div class="sort_block"> {#text_sort#} <a {if $smarty.get.sort == 'name' & $smarty.get.direction == 'asc'}class="active"{/if} href="{$LINK_sort_name_asc}">{#text_sort_name_asc#}</a> | <a {if $smarty.get.sort == 'name' & $smarty.get.direction == 'desc'}class="active"{/if} href="{$LINK_sort_name_desc}">{#text_sort_name_desc#}</a> | <a {if $smarty.get.sort == 'price' & $smarty.get.direction == 'asc'}class="active"{/if} href="{$LINK_sort_price_asc}">{#text_sort_price_asc#}</a> | <a {if $smarty.get.sort == 'price' & $smarty.get.direction == 'desc'}class="active"{/if} href="{$LINK_sort_price_desc}">{#text_sort_price_desc#}</a> </div>[/code] Quote Link to post Share on other sites
support 446 Posted May 28, 2011 Report Share Posted May 28, 2011 Да, примерно так. Quote Link to post Share on other sites
KoVaLsKy 59 Posted June 22, 2012 Report Share Posted June 22, 2012 Как то же самое но провернуть с числом товаров на странице? Quote Link to post Share on other sites
support 446 Posted June 22, 2012 Report Share Posted June 22, 2012 Может использовать $smarty.get.on_page Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.