Horizontal Peerlist as main menu

chiste
chiste's picture

Joined: 2008-05-15
Posts: 9
Posted: Thu, 2008-05-15 06:01

hi

I'm trying to make my peer list the main menu of my gallery

I tried creating an unsorted list like this

Quote:
<ul id="navigation" class="navigation" >
{foreach from=$theme.children item=child}
{capture assign=linkUrl}{g->url arg1="view=core.ShowItem" arg2="itemId=`$child.id`"}{/capture}
<li><a href="{$linkUrl}" >
{if !empty($child.title)}
{$child.title|markup}
{/if}
</a></li>
{/foreach}
</ul>

Which works, but when you click on an album link, the entire main navigation is replaced with the image (or sub album) name.

Then I realized that what I'm looking for is the PeerList behavior, which remains across the entire site.

How could I move the PeerList from the sidebar? Thanks

Login or register to post comments
floridave
floridave's picture

Joined: 2003-12-22
Posts: 10097
Posted: Thu, 2008-05-15 06:24

You would need to edit the theme and using a block:
http://codex.gallery2.org/Gallery2:Themes:Reference:Blocks
you can add that block to the theme.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

Login or register to post comments
chiste
chiste's picture

Joined: 2008-05-15
Posts: 9
Posted: Fri, 2008-05-16 05:09

Hey thanks, that was definitely the way to go, but I still have a problem. It works inside an album, lets say

http://localhost/pgp/main.php?g2_itemId=22

but not in the main page

http://localhost/pgp/main.php

It doesn't appear without the extra parameter in the url. Any idea in how to fix this?

Login or register to post comments
floridave
floridave's picture

Joined: 2003-12-22
Posts: 10097
Posted: Fri, 2008-05-16 05:18

are you using a different theme for the root album?

You want to change the extra parameter? ( use the url rewite module)

Sort of lost what you are asking.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

Login or register to post comments
chiste
chiste's picture

Joined: 2008-05-15
Posts: 9
Posted: Fri, 2008-05-16 05:24

mmmmm... actually I have the same problem I had with my original approach. Inside albums my navigation (Peerlist) is replaced with the picture file name.

Login or register to post comments
chiste
chiste's picture

Joined: 2008-05-15
Posts: 9
Posted: Fri, 2008-05-16 05:41

Thanks a lot for your help. Do you speak spanish? My english is kind of rusty. Lets see.

My idea is to have a web site with a horizontal navigation bar with 5 links to my main 5 albums. The experience should be as fallows:

1- Visitor enters for first time and see my header, with my logo and other links, fallow by horizontal peerlist at the top of the page and album thumbnails in the body.
2- When visitor clicks in any of the albums links (peerlist or thumbnail) should go deeper and see album content in the body, but peerlist should stay showing the main 5 album names (links)

What I have now is that main.php dosent show the peerlist, unless you enter inside an album, which works great, but when you click on an album item, the peerlist is replaced with the item name.

I'm attaching a screenshoot.

Thanks again for your help.

Login or register to post comments