Advanced search  


cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.

Pages: [1]   Go Down

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

0 Members and 1 Guest are viewing this topic.


  • 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:

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]
<li><a href="">..</a></li>
<li><a href="">..</a></li>
<li><a href="">..</a></li>

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:,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.



  • 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


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} -->
Pages: [1]   Go Up

Page created in 0.016 seconds with 20 queries.