Hi!
i'm trying to create a right-side menu for my template.
The problem it's that i want to show it on all pages instead displayimage.php, so i was thinking of creating a switch, and place it on template.html.
but i dunno where to create that switch (of if there it's a better way of doing it)
thanks in advance!
What do you mean by a "switch"?
If you create a right-side menu in template.html it will appear on all Coppermine pages.
i mean something like
<!-- BEGIN switch_right_menu -->
code of the right menu
<!-- END switch_right_menu -->
is it possible? would you recommend another way of doing it?
thanks in advance
any ideas ? :'(
If I understand you correctly you would have to modify your theme.php and the template.html and your stylesheet (at least I would do it like that)
look for the "pageheader" function in your theme.php. if you can't find it, copy it from the themes/sample/theme.php
now you can put an if-clause in the pageheader-function before the "echo template_eval($template_header, $template_vars);" like:
// if the current page is not displayimage.php
if ( !strstr($_SERVER['SCRIPT_NAME'], 'displayimage.php')) {
// your navigation
$nav_code = '<div class="nav">....<div>';
$template_vars['{SIDENAV}'] = $nav_code;
} else {
// if the current page is displayimage.php
$template_vars['{SIDENAV}'] = '';
}
then you have to put a {SIDENAV} marker in your template.html. a good position would probably be before the main table. with a little css float (-> google) for the classname "nav" (as used in the if-clause) you can position your navigation.
I am not 100% sure if that works but you can give it a try ;-)