1
kavaXtreme
Menu in Theme, not Block
  • 2005/4/19 22:20

  • kavaXtreme

  • Repository Maintainer

  • Posts: 110

  • Since: 2005/1/17


How do I go about coding the menu directly into the theme? I don't want hard coded links (that'd be too easy ). I need the links to be drawn from the XOOPS database depending on what modules are installed.

The full challenge--in case the above wasn't enough for you--would be to display the links horizontally, as many as fit on a single line and any that don't fit are not displayed. I know it can be done, but I forgot what site originally explained how... Oops!

Bring it on, you uber-themers out there!

2
jdseymour
Re: Menu in Theme, not Block

Multimenu 1.7 has a smarty code to apply a menu into the theme itself. Only compatible with mainlinks, no sublinks will be available.

3
kavaXtreme
Re: Menu in Theme, not Block
  • 2005/4/19 22:48

  • kavaXtreme

  • Repository Maintainer

  • Posts: 110

  • Since: 2005/1/17


Mainlinks is all I need, but I need it to be independent of non-core modules. I'm working on a theme for any interested parties in the XOOPS community, so I'm looking to make it an easy install, regardless of what the end user may have installed in the way of modules.

4
jdseymour
Re: Menu in Theme, not Block

Then multimenu would be the way to go here. You set the links yourself, so does not matter what modules are installed. Also another plus is that it supports either relative or absolute URLs.

You can find it Here..

I think it would be worth your look.

HTH.

5
kavaXtreme
Re: Menu in Theme, not Block
  • 2005/4/22 9:23

  • kavaXtreme

  • Repository Maintainer

  • Posts: 110

  • Since: 2005/1/17


One question before I go and try that: If I make a theme that uses a smarty tag from multimenu or any other multimenu functions, wouldn't that mean multimenu would also have to be installed by anyone who used the theme? Because what I'm trying to avoid is the end user needing to install ANYTHING other than the theme.

6
jdseymour
Re: Menu in Theme, not Block

Yes, that would be the case, as the tag calls the links from multimenu itself.

7
Herko
Re: Menu in Theme, not Block
  • 2005/4/22 9:45

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


and since this is not in the core, and the future core will have things more modularised, why not go this way? I mean, XOOPS 2.1 will not have any of the traditional core modules included in the default install packages. If you want, you can use multimenu for use with your theme (it's way better then the core main manu anyway).

The bottom line is: if it can be in a module, we will do so. The core will provide services for modules, and as few real features as possible.

Herko

8
kavaXtreme
Re: Menu in Theme, not Block
  • 2005/4/22 11:14

  • kavaXtreme

  • Repository Maintainer

  • Posts: 110

  • Since: 2005/1/17


But 2.1 will still have to include something like "function b_system_main_show()", no?

So shouldn't it be possible to either allow the theme to access the variables it needs from the system module, or include an appropriately modified "function b_system_main_show()" directly in the theme?

(By way of a disclaimer, my PHP knowledge is pretty basic at this point, which is why I ask lots of annoying questions. )

9
chapi
Re: Menu in Theme, not Block
  • 2005/4/22 19:00

  • chapi

  • Theme Designer

  • Posts: 611

  • Since: 2002/1/22


Why don't you just display the mainmenu block as center block on sites where you don't have the right column? In the theme you already detect the active module. So you also can include different styelsheets with this detection. It's just a way of formatting the menu differently in your css, depending on the module.

Login

Who's Online

171 user(s) are online (89 user(s) are browsing Support Forums)


Members: 0


Guests: 171


more...

Donat-O-Meter

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

Latest GitHub Commits