Tweaking the Matrix: tabbed navigation

mbjr

Joined: 2005-11-03
Posts: 12
Posted: Sun, 2008-02-03 12:45

Hello there,

I'm hacking the matrix theme and looking for a way to implement basic tabbed navigation. I have the following structure:

main album
>photos (visible by everybody)
>>subalbum1
>>subalbum2

>videos (visible by everybody)

>users (visible by registered users)
>>subalbum1
>>subalbum2

I can implement this on a very simple way when I'm in the main album:

<div class="gbTabBar" style="margin-left: 175px;">
      {if empty($theme.parents)}
      <span class="giSelected o"><span>
      {$theme.item.title}
      </span></span>
      {foreach from=$theme.children item=child}
         {if ($child.canContainChildren || $child.entityType == 'GalleryLinkItem')}
              {capture assign=linkUrl}{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}{/capture}
               <span class="o"><span>
               <a href="{$linkUrl}">{$child.title|capitalize}</a>
               </span></span>
         {/if}
      {/foreach}
    {else}...

But facing difficulties when I need to get the main album's items from a subalbum, i.e. videos/subalbum1/subalbum2 needs to show the same tabs (photos, videos, users).

Can you give me a hint on how do I get the top album's children on a static way (referring to ID, etc)?

Thanks in advance,
Stevo