Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: {Sys_menu} and {Sub_menu} Template Overrides  (Read 3649 times)

0 Members and 1 Guest are viewing this topic.

gav240z

  • Coppermine newbie
  • Offline Offline
  • Posts: 14
{Sys_menu} and {Sub_menu} Template Overrides
« on: June 03, 2009, 04:20:51 pm »

Hi Guys,
I'm confused by {Sys_menu} and {Sub_menu}. I want to be able to theme each menu and have them output as <ul><li> items.

Here is my gallery: http://www.viczcar.com/gallery/

Currently they are just output

Code: [Select]
<a title="Go to the home page" href="/">Home</a>
::
<a title="Go to my personal gallery" href="index.php?cat=10002">My gallery</a>
::
........

But I want them to look like:

Code: [Select]
<ul>
<li><a href="">..</a></li>
<li><a href="">..</a></li>
<li><a href="">..</a></li>
</ul>

If I can get them into list items I can easily create a XHTML /CSS button and make the menu's more user friendly.

Can anyone help me with a theme.php override that will allow me to create simple lists like this?

I read this thread: http://forum.coppermine-gallery.net/index.php/topic,26897.0.html but it didn't really help me. (I also looked into the sample theme folder and its theme.php) but couldn't work it out.

 
Logged

Nibbler

  • Guest
Re: {Sys_menu} and {Sub_menu} Template Overrides
« Reply #1 on: June 03, 2009, 04:53:29 pm »

Just add the new definitions into your custom theme.php

Code: [Select]
// HTML template for sys_menu
$template_sys_menu = <<<EOT
          <ul>{BUTTONS}</ul>
EOT;

and

Code: [Select]
  // HTML template for template sys_menu buttons
  $template_sys_menu_button = <<<EOT
  <!-- BEGIN {BLOCK_ID} -->
        <li><a href="{HREF_TGT}" title="{HREF_TITLE}">{HREF_LNK}</a></li>
  <!-- END {BLOCK_ID} -->
EOT;
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.