Announcement

#1 2014-12-11 06:57:07

ssnake
Member
2014-10-22
6

How to make this kind of link in menubar.tpl?

Hi,

My goal is to remake menubar.tpl. I only need it to display a few albums and their subalbums, the searchbar and login. I don't need any random pictures, no specialty links, no plugin links future or present; just the albums are important.

It would look like (albums on mouseover):

Album1 | Album 2 | Album3      [Search] [login]
Sub          Sub          Sub
Sub          Sub          Sub
Sub          Sub          Sub

The trouble is, I don't know how to make a query to fetch the dynamic list of albums and which subalbums belong to it.

I pulled this from mbSpecials in the existing menubar.tpl, so I'd imagine it would resemble this, but how it sorts out parent/child albums is beyond me.

Code:

<dd>
  <ul>{strip}
    {foreach from=$block->data item=link}
    <li><a href="{$link.URL}" title="{$link.TITLE}"{if isset($link.REL)} {$link.REL}{/if}>{$link.NAME}</a></li>
    {/foreach}
    {if isset($blocks.mbMenu)}
    <hr>
    {foreach from=$blocks.mbMenu->data item=link}{if is_array($link)}
    <li><a href="{$link.URL}" title="{$link.TITLE}"{if isset($link.REL)} {$link.REL}{/if}>{$link.NAME}</a>{if isset($link.COUNTER)} ({$link.COUNTER}){/if}</li>
    {/if}{/foreach}
    {/if}
  {/strip}</ul>
</dd>

I'd like to have used the Advanced Menubar plugin, but support is slow there and the issue I asked about kept placing extra links in the dropdown boxes and I only need simple links. Any help would be appreciated.

Piwigo: 2.7.2
PHP: 5.3.4 (Show info) [2014-12-11 05:51:40]
MySQL: 5.1.53-community-log [2014-12-11 00:51:40]
Theme: Modus

Last edited by ssnake (2014-12-11 06:59:20)

Offline

 

#2 2014-12-11 07:16:39

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7207

Re: How to make this kind of link in menubar.tpl?

Hi :-)

Go to Administration -> Configuration -> menus

You can add bloc ;-)


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#3 2014-12-11 07:45:56

ssnake
Member
2014-10-22
6

Re: How to make this kind of link in menubar.tpl?

ddtddt wrote:

Hi :-)

Go to Administration -> Configuration -> menus

You can add bloc ;-)

That helps me disable the extra junk, but does not help me add an album to the menubar as a menu item.

Offline

 

#4 2014-12-11 12:14:16

ddtddt
Piwigo Team
Quetigny - France
2007-07-27
7207

Re: How to make this kind of link in menubar.tpl?


You love Piwigo so don't hesitate to participate, learn more on the "Contribute to Piwigo" page. If you don't have much time for contribution, you can also help the project with a donation.

Offline

 

#5 2014-12-20 15:18:46

ssnake
Member
2014-10-22
6

Re: How to make this kind of link in menubar.tpl?

Sorry, thought I replied to this. In my original post, I stated "I'd like to have used the Advanced Menubar plugin, but support is slow there and the issue I asked about kept placing extra links in the dropdown boxes"

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact