root/shop/view_favourites.tt
[%- meta.wrapper = 'shop/wrapper.tt';
meta.title = "Favourite Items";
-%]
<h3>
[% meta.title %]
</h3>
[%- FOREACH item IN favourites.all %]
<p>
<a href="[% c.uri_for( 'item', item.code ) %]"><img src="[% c.uri_for( '/static/cms-uploads/shop-images/thumbnails', item.image ) %]" alt="Image of [% item.name | html %]" title="Click to enlarge"></a>
</p>
<p>
<a href="[% c.uri_for( 'item', item.code ) %]">[% item.name | html %]</a>
</p>
[%- END %]
<p>
<span class="small">
Viewing items [% favourites.pager.first %] to [% favourites.pager.last %]
of [% favourites.pager.total_entries %]
</span>
</p>
[%- IF favourites.count != favourites.pager.total_entries %]
<p>
<span class="small">
<a href="[% c.uri_for( 'favourites' ) %]">«</a>
[%- FOREACH page IN [ favourites.pager.first_page .. favourites.pager.last_page ] %]
[%- IF page == favourites.pager.current_page -%]
<b>[% page %]</b>
[%- ELSE -%]
<a href="[% c.uri_for( 'favourites', page ) %]">[% page %]</a>
[%- END -%]
[%- END %]
<a href="[% c.uri_for( 'favourites', favourites.pager.last_page ) %]">»</a>
</span>
</p>
[%- END %]