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: Changing the order of the Menu  (Read 3287 times)

0 Members and 1 Guest are viewing this topic.

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Changing the order of the Menu
« on: January 03, 2011, 03:38:15 pm »

Hi

Is there anything other than the theme.php file which affects the order that items appear in the menu?

What I would like is for the Registration / Login / Logout items to the right of "Search" and I would like the Custom Link to be the one furthest to the left (it will be the one to the site's Portal, with the gallery index next to it)

What i tried to achieve this was to move the following:

Code: [Select]
<!-- BEGIN register -->
                <li>
                    <a href="{REGISTER_TGT}" title="{REGISTER_TITLE}" class="firstlevel"><span class="firstlevel">{REGISTER_ICO}{REGISTER_LNK}</span></a>
                </li>
<!-- END register -->
<!-- BEGIN login -->
                <li>
                    <a href="{LOGIN_TGT}" title="{LOGIN_LNK}" class="firstlevel"><span class="firstlevel">{LOGIN_ICO}{LOGIN_LNK}</span></a>
                </li>
<!-- END login -->
<!-- BEGIN logout -->
                <li>
                    <a href="{LOGOUT_TGT}" title="{LOGOUT_LNK}" class="firstlevel"><span class="firstlevel">{LOGOUT_ICO}{LOGOUT_LNK}</span></a>
                </li>
<!-- END logout -->

to a postion just after

Code: [Select]
<!-- BEGIN search -->
                <li>
                    <a href="{SEARCH_TGT}" title="{SEARCH_LNK}" class="firstlevel"><span class="firstlevel">{SEARCH_ICO}{SEARCH_LNK}</span></a>
                </li>
<!-- END search -->

Sadly this didn't work with a page reulting that looked like this (literally):
Code: [Select]
Template error
Failed to find block 'login' (#<!-- BEGIN login -->(.*?)<!-- END login -->#s) in :

<ul class="dropmenu">
<!-- BEGIN home -->
                <li>
                    <a href="{HOME_TGT}" title="{HOME_TITLE}" class="firstlevel"><span class="firstlevel">{HOME_ICO}{HOME_LNK}</span></a>
                    <ul>
                    <!-- BEGIN contact -->
                                <li>
                                    <a href="{CONTACT_TGT}" title="{CONTACT_TITLE}"><span>{CONTACT_ICO}{CONTACT_LNK}</span></a>
                                </li>
                    <!-- END contact -->
                    <!-- BEGIN sidebar -->
                                    <li>
                                        <a href="{SIDEBAR_TGT}" title="{SIDEBAR_TITLE}"><span>{SIDEBAR_ICO}{SIDEBAR_LNK}</span></a>
                                    </li>
                    <!-- END sidebar -->
                    <!-- BEGIN my_profile -->
                                    <li>
                                        <a href="{MY_PROF_TGT}" title="{MY_PROF_LNK}"><span>{MY_PROF_ICO}{MY_PROF_LNK}</span></a>
                                    </li>
                    <!-- END my_profile -->
                    </ul>
                </li>
<!-- BEGIN allow_memberlist -->
                                    <!--
                                    <li>
                                        <a href="{MEMBERLIST_TGT}" title="{MEMBERLIST_TITLE}"><span>{MEMBERLIST_ICO}{MEMBERLIST_LNK}</span></a>
                                    </li>
                                    -->
<!-- END allow_memberlist -->

<!-- END home -->
<!-- BEGIN my_gallery -->
                <li>
                    <a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}" class="firstlevel"><span class="firstlevel">{MY_GAL_ICO}{MY_GAL_LNK}</span></a>
                    <ul>
                    <!-- BEGIN allow_memberlist -->
                                    <li>
                                        <a href="{MEMBERLIST_TGT}" title="{MEMBERLIST_TITLE}"><span>{MEMBERLIST_ICO}{MEMBERLIST_LNK}</span></a>
                                    </li>
                    <!-- END allow_memberlist -->
                    <!-- BEGIN enter_admin_mode -->
                                    <li>
                                    <a href="{ADM_MODE_TGT}" title="{ADM_MODE_TITLE}"><span>{ADM_MODE_ICO}{ADM_MODE_LNK}</span></a>
                                    </li>
                    <!-- END enter_admin_mode -->
                    <!-- BEGIN leave_admin_mode -->
                                    <li>
                                        <a href="{USR_MODE_TGT}" title="{USR_MODE_TITLE}"><span>{USR_MODE_ICO}{USR_MODE_LNK}</span></a>
                                    </li>
                    <!-- END leave_admin_mode -->
                    </ul>
                </li>
<!-- END my_gallery -->
<!-- BEGIN upload_pic -->
                <li>
                    <a href="{UPL_PIC_TGT}" title="{UPL_PIC_TITLE}" class="firstlevel"><span class="firstlevel">{UPL_PIC_ICO}{UPL_PIC_LNK}</span></a>
                </li>
<!-- END upload_pic -->

</ul>

There seem to be two <ul class="dropmenu"> lists, one starting with <!-- BEGIN home --> and the second beginning with <!-- BEGIN custom_link -->

Somehow the page seems to be expecting the Registration / Login / Logout to be in the first list and when I move it to the second list, it does not find it. Presumably the same problem will arise in reverse with the Custom Menu item?

What is it that is looking for these items in these lists and how can I edit the files to make the menu appear in the order that I want?

Thanks

Martin
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Changing the order of the Menu
« Reply #1 on: January 03, 2011, 04:24:39 pm »

In Coppermine there's a sys_menu and a sub_menu. You cannot exchange buttons between those menus but only move the order inside that menus. Of course you can change the order of the sys_menu and the sub_menu, but that's not exactly what you asked for.

However, if you want to display buttons from the sub_menu inside the sys_menu (or vice-versa) you can remove them from the menu, but you have to leave the HTML comments where they are. Keep in mind that moving a menu button to the other menu will always be displayed until you change the code to remove them (e.g. if the user don't have the permission to see that button).
Logged

uk_martin

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 186
Re: Changing the order of the Menu
« Reply #2 on: January 03, 2011, 05:01:42 pm »

hmmm, I guess that's an end to that then.

I did see on another help thread something about a second custom menu item being able to be "hard coded" into the menu, so I've done that instead for the link to the portal. I'll have to live with the login (etc) being where it is by the sounds of it then.

Thanks anyway.

Martin
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.