95 lines
2.3 KiB
HTML
Executable File
95 lines
2.3 KiB
HTML
Executable File
{assign var=category_current_page value={$smarty.get.category_page|default:1}}
|
|
|
|
<h1>Pagination</h1>
|
|
|
|
<h2>Categories</h2>
|
|
|
|
<div style="border: solid 1px; padding: 20px;">
|
|
|
|
{loop name="cat" type="category" page="{$category_current_page}" limit="2"}
|
|
<h2>{$LOOP_COUNT} - {$TITLE}</h2>
|
|
<h3>Products :</h3>
|
|
|
|
<div style="border: solid 1px; padding: 20px;">
|
|
|
|
{assign var=this_product_getter value="product_`$ID`_page"}
|
|
|
|
{assign var=product_current_page value={$smarty.get.$this_product_getter|default:1}}
|
|
|
|
<ul>
|
|
{loop name="prod" type="product" category="$ID" page="{$product_current_page}" limit="2"}
|
|
<li>
|
|
{$ID}:{$REF}
|
|
</li>
|
|
{/loop}
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<p>{$TITLE} page choice</p>
|
|
{pageloop rel="prod"}
|
|
{if $PAGE != $product_current_page}
|
|
<a href="index_dev.php?view=pagination&category_page={$category_current_page}&{$this_product_getter}={$PAGE}">{$PAGE}</a>
|
|
{else}
|
|
{$PAGE}
|
|
{/if}
|
|
{if $PAGE != $LAST}
|
|
-
|
|
{/if}
|
|
{/pageloop}
|
|
|
|
{/loop}
|
|
|
|
</div>
|
|
|
|
<p>categories page choice</p>
|
|
{pageloop rel="cat"}
|
|
{if $PAGE != $category_current_page}
|
|
<a href="index_dev.php?view=pagination&category_page={$PAGE}">{$PAGE}</a>
|
|
{else}
|
|
{$PAGE}
|
|
{/if}
|
|
{if $PAGE != $LAST}
|
|
-
|
|
{/if}
|
|
{/pageloop}
|
|
|
|
<hr>
|
|
Pagination before loop
|
|
<hr>
|
|
{assign var=product_current_page value={$smarty.get.$this_product_getter|default:1}}
|
|
|
|
{capture name="prod2"}
|
|
{loop name="prod2" type="product" page="{$product_current_page}" limit="2"}
|
|
<li>
|
|
{$ID}:{$REF}
|
|
</li>
|
|
{/loop}
|
|
{/capture}
|
|
|
|
{pageloop rel="prod2"}
|
|
{if ${PAGE} != {$product_current_page}}
|
|
<a href="index_dev.php?view=pagination&category_page={$category_current_page}&{$this_product_getter}={$PAGE}">{$PAGE}</a>
|
|
{else}
|
|
{$PAGE}
|
|
{/if}
|
|
{if $PAGE != $LAST}
|
|
-
|
|
{/if}
|
|
{/pageloop}
|
|
|
|
{$smarty.capture.prod2}
|
|
|
|
{pageloop rel="prod2"}
|
|
{if ${PAGE} != {$product_current_page}}
|
|
<a href="index_dev.php?view=pagination&category_page={$category_current_page}&{$this_product_getter}={$PAGE}">{$PAGE}</a>
|
|
{else}
|
|
{$PAGE}
|
|
{/if}
|
|
{if $PAGE != $LAST}
|
|
-
|
|
{/if}
|
|
{/pageloop}
|
|
|
|
|