1
vinit
Horizontal main menu - need smarty help
  • 2007/10/2 6:54

  • vinit

  • Just can't stay away

  • Posts: 530

  • Since: 2004/1/10


Hi,

I have tried to integrate the main menu into my template as default horizontal menu.

i used the same code as that of mainmenu in default template set

<div style="float: right; width: 100%">
        <
ul id="cssmenu">
                <
li><a  href="<{$xoops_url}>/" id="menu1" title="<{$block.lang_home}>"><{$block.lang_home}>a>li>
                <{foreach 
item=module from=$block.modules}>
                        <
li class="havechild">  <a  href="<{$xoops_url}>/modules/<{$module.directory}>/" id="menu-<{$module.name}>"><{$module.name}>a>
                                <
ul>
                                        <{foreach 
item=sublink from=$module.sublinks}>
                                                <
li >  <a  href="<{$sublink.url}>" id="menu-<{$sublink.name}>"><{$sublink.name}>a>li>
                                        <{/foreach}>
                                ul>
                        li>
                <{/foreach}>

        ul>
div>


Things came up very nice, now i wanted to disable the the main menu from showing up in any blocks, so i marked the mainmenu block as disabled. This resulted in disabling my custom code of menu in theme too...:(

So i want to know how can i disable the main menu showing up in any of the blocks, yet it is should be active so that i can see its results in custom horizontal menu.


This is how it looks like now
Resized Image


Any help would be appreciated.


Thanks
Vinit
[size=xx-small].[/size]

2
stefan88
Re: Horizontal main menu - need smarty help
  • 2007/10/2 7:09

  • stefan88

  • Community Support Member

  • Posts: 1086

  • Since: 2004/9/20


Hi,

one way would be to use the way from multimenu - read here: https://xoops.org/modules/newbb/viewtopic.php?topic_id=57061&forum=4&post_id=252742#forumpost252385

but instead of showing and hiding multimenu block, do it for mainmenu.

The other way may be to use a block position you don't need. For example if you do not use right blocks, remove the code for them from the theme and place the menu in that position ...

..

3
Burning
Re: Horizontal main menu - need smarty help
  • 2007/10/2 7:14

  • Burning

  • Theme Designer

  • Posts: 1163

  • Since: 2006/8/22


Hi,

Very nice idea ! I hope you'll get some good help to make this block works !

Personnally I use for horizontal menu a morphogenesis gabarit (dynamic version) to make an horizontal main menu. It's not a block but maybe useful 'cause you can show or hide elements to visitors (relating to permissions)

[sorry for my poor english]

@+
Still learning CSS and... english

4
vinit
Re: Horizontal main menu - need smarty help
  • 2007/10/2 8:49

  • vinit

  • Just can't stay away

  • Posts: 530

  • Since: 2004/1/10


@stefan: Thanks, i got it fixed :)

@Burnning: thanks, I got my own horizontal menu using mootools javascript with some effects, finally it came up very well :) and simple, sobber drop down menu.

All i need to do is, include a menu theme file, in the main theme file and voila the horizontal menu appears up :)
[size=xx-small].[/size]

5
nachenko
Re: Horizontal main menu - need smarty help
  • 2007/10/2 8:51

  • nachenko

  • Quite a regular

  • Posts: 356

  • Since: 2005/1/18


I see two "smarty" solutions on this.

· You have 8 possible locations for your block in XOOPS. Put the mainmenu block in a location that you don't use, then delete this location from the main template.

· Relocate one of those 8 possible locations to the position you want it to appear. This is how it's done in this site:

http://www.ugr.es/~ncog/modules/news/index.php?storytopic=8

The submenu left is located bottom left column. I relocated it in the template.

More info on blocks location and rendering process here:
http://www.xoopswiki.org/wiki/index.php?title=XOOPS_Page_Rendering


Another, more dirty trick should be to edit main menu template and add some CSS on the first tag:

style="visibility: hidden"

It's dirty, but it works.

Login

Who's Online

163 user(s) are online (47 user(s) are browsing Support Forums)


Members: 0


Guests: 163


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Dec 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits