Place currentItem in the middle of prev. / next

petri
petri's picture

Joined: 2005-12-15
Posts: 253
Posted: Sat, 2008-11-22 04:08

Hello,

I am running the matrix them and I am tryiing to add the current and totals items (2 of 10).
right now, I am having this code for the navigation

Quote:
{if !empty($theme.navigator)}
<div class="gbBlock gcBackground2 gbNavigator">
{g->block type="core.Navigator" navigator=$theme.navigator reverseOrder=true} </div>
{/if}

So that I have the First/previous links on the left of the page and the next/last link on the right of the page, on the same line.

I would like to have the current/total item in the middle of that line.

I was thinking of using that one :

Quote:
{if !empty($theme.navigator)}
{g->callback type="core.LoadPeers" item=$theme.item windowSize=1}
{g->block type="core.Navigator"
currentItem=$block.core.LoadPeers.thisPeerIndex
totalItems=$block.core.LoadPeers.peerCount}
{/if}

I found this code on Siriux but the links are on three lines instead of one :

Quote:
{* Navigator *}
{if !empty($theme.navigator)}
{g->callback type="core.LoadPeers" item=$theme.item windowSize=1}
{g->block type="core.Navigator" navigator=$theme.navigator prefix="&laquo; " suffix=" &raquo;"
currentItem=$block.core.LoadPeers.thisPeerIndex totalItems=$block.core.LoadPeers.peerCount}
{/if}

Anyone already did put the current/total item in the middle of the matrix nav ?