-
-
Save Fi1osof/9cd5f629200ee23ddd2d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{$_GET = []} | |
{foreach $smarty.get as $k => $v} | |
{if $k == 'q'} | |
{continue} | |
{/if} | |
{$_GET[$k] = $v} | |
{/foreach} | |
{$doc_id = $doc_id|default:$modx->resource->id} | |
{$listtype = $smarty.get.listtype|default:"tile"} | |
<div> | |
Сортировка по: | |
{$sort_params = array_merge($_GET, [ | |
"sort" => "price", | |
"dir" => "DESC" | |
])} | |
<a href="{$modx->makeUrl($doc_id,null, $sort_params)}">Цене от большего к меньшему</a> | | |
{$sort_params = array_merge($_GET, [ | |
"dir" => "ASC" | |
])} | |
<a href="{$modx->makeUrl($doc_id,null, $sort_params)}">Цене от меньшего к большему</a> | | |
{$sort_params = array_merge($_GET, [ | |
"sort" => "name", | |
"dir" => "DESC" | |
])} | |
<a href="{$modx->makeUrl($doc_id,null, $sort_params)}">Наименованию по алфавиту</a> | | |
{$sort_params = array_merge($_GET, [ | |
"dir" => "ASC" | |
])} | |
<a href="{$modx->makeUrl($doc_id,null, $sort_params)}">Наименованию обратно алфавиту</a> | |
</div> | |
<hr /> | |
<div style="position:relative;"> | |
<div style="float: left;"> | |
Кол-во позиций на странице: | |
{$limit_params = array_merge($_GET, [ | |
"page" => "", | |
"limit" => 10 | |
])} | |
<a href="{$modx->makeUrl($doc_id,null, $limit_params)}">10</a> | | |
{$limit_params = array_merge($_GET, [ | |
"page" => "", | |
"limit" => 30 | |
])} | |
<a href="{$modx->makeUrl($doc_id,null, $limit_params)}">30</a> | | |
{$limit_params = array_merge($_GET, [ | |
"page" => "", | |
"limit" => 50 | |
])} | |
<a href="{$modx->makeUrl($doc_id,null, $limit_params)}">50</a> | | |
{$limit_params = array_merge($_GET, [ | |
"page" => "", | |
"limit" => 0 | |
])} | |
<a href="{$modx->makeUrl($doc_id,null, $limit_params)}">Все</a> | |
</div> | |
<div style="float: left;margin-left:30px;"> | |
Вид: | |
{$listtype_params = array_merge($_GET, [ | |
"listtype" => "tile" | |
])} | |
<span class="link" id="show_default"><a href="{$modx->makeUrl($doc_id,null, $listtype_params)}">плитка</a></span> | | |
{$listtype_params = array_merge($_GET, [ | |
"listtype" => "list" | |
])} | |
<span class="link" id="show_alt"><a href="{$modx->makeUrl($doc_id,null, $listtype_params)}">список</a></span> | |
</div> | |
<div style="float: right;">{ph name="page.nav"}</div> | |
<div class="clear"></div> | |
</div> | |
<div class="list_image {if $listtype == 'list'}list_row{/if}"> | |
{foreach $result.object as $object} | |
{include file="shop/products/list/layout.tpl"} | |
{/foreach} | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment