Xuups
Get an account!     Login

Utilities

Main menu

Who's Online

10 user(s) are online (1 user(s) are browsing Hacks and Tips)

Members: 0
Guests: 10

more...

Get Xoops

Support Xuups Project

Themes :  Adding an horizontal multiMenu to Xoops
Tags: themes   multimenu   blocks   hacks  
 
As you may have noticed xoops is limited to 8 block zones: Left, right, center, etc...
How can you make an extra block zone to lay your horizontal menu that you have made with multiMenu module?

There are several ways of doing this so I'll share the one I use on this site:

First you have to choose a unique name for your multiMenu Block, I have chosen for this example 'page_navbar'.

Then I set my 'page_navbar' block to display in the 'left' side for all pages.

To finalize it I made 2 changes in my theme:

I added a table to show my navbar content (and removing the title):
<table>
<
tr>
    <
td id="page_navbar" colspan="3"><!-- Start navbar loop -->

<{foreach 
item=block from=$xoops_lblocks}>
<{if 
$block.title == 'page_navbar'}>
      <{if 
$block.content}><div class="blockContent"><{$block.content}></div><{/if}>
<{/if}>
<{/foreach}>
      <!-- 
End navbar loop -->
    </
td>
</
tr>
</
table>


and then I set an if condition for left blocks to exclude the page_navbar one:

<{foreach item=block from=$xoops_lblocks}>
      <{if 
$block.title != 'page_navbar'}>
      <
div class="blockTitle"><{$block.title}></div>
      <
div class="blockContent"><{$block.content}></div>
      <{/if}>
<{/foreach}>


That is it!


TDM

If you know any other ways of doing this, please share them. You can register and submit content without need for approval. Thanks!
Author
trabis
Author trabis
News by the same authorMore stories
Author rssAuthor rss
StatisticsStatistics
 
Story
Date 2008/8/2 20:10:45
Views 6415
Favorites 1
Send this Story to a FriendSend
Printer Friendly PagePrint
Create a PDF from the articleCreate a pdf
 
Bookmarks
         
         
         
         
         
     
Recents
How to sucessfuly add scripts in your Xoops Themes
Query timers on debug for xoops 2.3
Highlighting current module on mainMenu
Main menu hack - on click submenus
Preventing empty blocks to display
Random
How to sucessfuly add scripts in your Xoops Themes
Highlighting current module on mainMenu
Main menu hack - on click submenus
Preventing empty blocks to display
Hacking Multimenu - Selected menus
The comments are owned by the poster. We aren't responsible for their content.
Poster Thread
Mowaffaq
Posted: 2009/3/5 0:50  Updated: 2009/3/5 0:50
Moderator
Joined: 2008/6/2
From:
Posts: 48
 Re: Adding an horizontal multiMenu to Xoops
Very nice article .. thanks trabis
 

Login

Username:

Password:

Remember me



Lost Password?

Register now!

Ajax Search


Advanced Search

Sub menu

Last comments