Moving items from sys_menu to sub_menu Moving items from sys_menu to sub_menu
 

News:

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.
[more]

Main Menu

Moving items from sys_menu to sub_menu

Started by aunrea, January 06, 2007, 06:41:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

aunrea

Is there a way to move sys_menu items to sub_menu? I have tried this by basicly copying the info in sys_menu to sub_menu but when I view my site it shows {variable} instead of what the variable represents. Is there a way to do this?

You can see what I mean at http://scrapbooking.spot-design.net/gallery

This is what I have in the theme.php file:

define('THEME_HAS_NO_SUB_MENU_BUTTONS', 1);

// HTML template for sys menu
$template_sys_menu = <<<EOT


<!-- BEGIN home -->
<li><a href="{HOME_TGT}" title="{HOME_TITLE}">Home</a></li>
<!-- END home -->

<!-- BEGIN album_list -->
<li><a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">Gallery</a></li>
<!-- END album_list -->

<!-- BEGIN allow_memberlist -->
<li><a href="{MEMBERLIST_TGT}" title="{MEMBERLIST_TITLE}">{MEMBERLIST_LNK}</a></li>
<!-- END allow_memberlist -->



<!-- BEGIN my_gallery -->
<li><a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}">{MY_GAL_LNK}</a></li>
<!-- END my_gallery -->
<!-- BEGIN upload_pic -->
<li><a href="{UPL_PIC_TGT}" title="{UPL_PIC_TITLE}">{UPL_PIC_LNK}</a></li>
<!-- END upload_pic -->
<!-- BEGIN faq -->
<li><a href="{FAQ_TGT}" title="{FAQ_TITLE}">{FAQ_LNK}</a></li>
<!-- END faq -->
<!-- BEGIN custom_link -->
<li><a href="{CUSTOM_LNK_TGT}" title="{CUSTOM_LNK_TITLE}">{CUSTOM_LNK}</a></li>
<!-- END custom_link -->




<!-- BEGIN archives -->
<li><a href="http://scrapbooking.spot-design.net/archives/" title="Archives">Achives</a></li>
<!-- END archives -->

<!-- BEGIN links -->
<li><a href="http://scrapbooking.spot-design.net/links/" title="Links">Links</a></li>
<!-- END links -->

<!-- BEGIN affiliates -->
<li><a href="http://scrapbooking.spot-design.net/affiliates/" title="Affiliates">Affiliates</a></li>
<!-- END affiliates -->

<!-- BEGIN my_profile -->
<li><a href="{MY_PROF_TGT}" title="{MY_PROF_LNK}">{MY_PROF_LNK}</a></li>
<!-- END my_profile -->

<!-- BEGIN enter_admin_mode -->
<li><a href="{ADM_MODE_TGT}" title="{ADM_MODE_TITLE}">{ADM_MODE_LNK}</a></li>
<!-- END enter_admin_mode -->

<!-- BEGIN leave_admin_mode -->
<li><a href="{USR_MODE_TGT}" title="{USR_MODE_TITLE}">{USR_MODE_LNK}</a></li>
<!-- END leave_admin_mode -->

<!-- BEGIN register -->
<li><a href="{REGISTER_TGT}" title="{REGISTER_TITLE}">{REGISTER_LNK}</a></li>
<!-- END register -->

<!-- BEGIN login -->
<li><a href="{LOGIN_TGT}" title="{LOGIN_LNK}">{LOGIN_LNK}</a></li>
<!-- END login -->

<!-- BEGIN logout -->
<li><a href="{LOGOUT_TGT}" title="{LOGOUT_LNK}">{LOGOUT_LNK}</a></li>
<!-- END logout -->

                                       

EOT;


// HTML template for sub menu
$template_sub_menu = <<<EOT
                                        <ul>

<li><a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}">{MY_GAL_LNK}</a></li>
<li><a href="{UPL_PIC_TGT}" title="{UPL_PIC_LNK}">{UPL_PIC_LNK}</a></li>
<li><a href="{LASTUP_TGT}" title="{LASTUP_LNK}">{LASTUP_LNK}</a></li>
<li><a href="{LASTCOM_TGT}" title="{LASTCOM_LNK}">{LASTCOM_LNK}</a></li>
<li><a href="{TOPN_TGT}" title="{TOPN_LNK}">{TOPN_LNK}</a></li>
<li><a href="{TOPRATED_TGT}" title="{TOPRATED_LNK}">{TOPRATED_LNK}</a></li>
<li><a href="{FAV_TGT}" title="{FAV_LNK}">{FAV_LNK}</a></li>
<li><a href="{SEARCH_TGT}" title="{SEARCH_LNK}">{SEARCH_LNK}</a></li>
<li><a href="{FAQ_TGT}" title="{FAQ_LNK}">{FAQ_LNK}</a></li>

                                        </ul>

EOT;


Gizmo

Copy function theme_main_menu($which) from the sample theme.php and make the changes to the array's there as well. It's a lot to paste here but I think you'll get the picture.
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

aunrea

Now it is working. I don't know why. I continued working on my theme when I noticed it was working correctly! I don't think I changed anything in the menus. Who knows, sometimes the internet can do mysterious things.  :P