Welcome to Geeklog, Anonymous Thursday, November 28 2024 @ 01:27 pm EST
Geeklog Forums
Add a navbar to the footer
Status: offline
asmaloney
Forum User
Full Member
Registered: 02/08/04
Posts: 214
I'm working on a site where I wanted the navbar to show up in the header and the footer. As far as I could tell there was no nice way to do this, so... HACK!
In lib-common.php, add this code to the bottom of the function COM_renderMenu():
// ASM hack
global $ASM_saved_menu;
$ASM_saved_menu = $header->get( 'menu_elements' );
// ASM hack
Then in the function COM_siteFooter(), just before
$exectime = $_PAGE_TIMER->stopTimer();
$exectext = $LANG01[91] . ' ' . $exectime . ' ' . $LANG01[92];
add this:
// ASM hack
global $ASM_saved_menu;
$footer->set_var( 'menu_elements', $ASM_saved_menu );
// ASM hack
That's it - simple and efficient.
I would love to see a solution for this integrated into GL at some point with a config option for placement of the navbars...
Oh, and don't forget to add the {menu_elements} to your theme's footer.thtml...
- Andy
In lib-common.php, add this code to the bottom of the function COM_renderMenu():
Text Formatted Code
// ASM hack
global $ASM_saved_menu;
$ASM_saved_menu = $header->get( 'menu_elements' );
// ASM hack
Then in the function COM_siteFooter(), just before
Text Formatted Code
$exectime = $_PAGE_TIMER->stopTimer();
$exectext = $LANG01[91] . ' ' . $exectime . ' ' . $LANG01[92];
add this:
Text Formatted Code
// ASM hack
global $ASM_saved_menu;
$footer->set_var( 'menu_elements', $ASM_saved_menu );
// ASM hack
That's it - simple and efficient.
I would love to see a solution for this integrated into GL at some point with a config option for placement of the navbars...
Oh, and don't forget to add the {menu_elements} to your theme's footer.thtml...
- Andy
5
6
Quote
Status: offline
chiloso
Forum User
Junior
Registered: 04/18/05
Posts: 24
i would like to see what it looks like. do you have a sample?
Quote by asmaloney: I'm working on a site where I wanted the navbar to show up in the header and the footer. As far as I could tell there was no nice way to do this, so... HACK!
In lib-common.php, add this code to the bottom of the function COM_renderMenu():
// ASM hack
global $ASM_saved_menu;
$ASM_saved_menu = $header->get( 'menu_elements' );
// ASM hack
Then in the function COM_siteFooter(), just before
$exectime = $_PAGE_TIMER->stopTimer();
$exectext = $LANG01[91] . ' ' . $exectime . ' ' . $LANG01[92];
add this:
// ASM hack
global $ASM_saved_menu;
$footer->set_var( 'menu_elements', $ASM_saved_menu );
// ASM hack
That's it - simple and efficient.
I would love to see a solution for this integrated into GL at some point with a config option for placement of the navbars...
Oh, and don't forget to add the {menu_elements} to your theme's footer.thtml...
- Andy
In lib-common.php, add this code to the bottom of the function COM_renderMenu():
Text Formatted Code
// ASM hack
global $ASM_saved_menu;
$ASM_saved_menu = $header->get( 'menu_elements' );
// ASM hack
Then in the function COM_siteFooter(), just before
Text Formatted Code
$exectime = $_PAGE_TIMER->stopTimer();
$exectext = $LANG01[91] . ' ' . $exectime . ' ' . $LANG01[92];
add this:
Text Formatted Code
// ASM hack
global $ASM_saved_menu;
$footer->set_var( 'menu_elements', $ASM_saved_menu );
// ASM hack
That's it - simple and efficient.
I would love to see a solution for this integrated into GL at some point with a config option for placement of the navbars...
Oh, and don't forget to add the {menu_elements} to your theme's footer.thtml...
- Andy
4
6
Quote
All times are EST. The time is now 01:27 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content