1
Wonderfish1
Adding an item to the main menu

I thought this would be easy....

I just want to add an item to the main menu, at the top level, that links to a page in one of the modules (XCGallery, but it shouldn't matter if I just put the url in)?

I just wanted one of the galleries in XCGallery to be separately accessible from the main menu.


TIA,
Tim

2
stefan88
Re: Adding an item to the main menu
  • 2007/2/28 14:13

  • stefan88

  • Community Support Member

  • Posts: 1086

  • Since: 2004/9/20


Hi,

You may need to clean 'template_c' folder (except for index.html file)

Also if you edited the file, you may need to update system module


On a side note: alternative way would be to use module like multimenu to have more flexible menu structure.
..

3
Wonderfish1
Re: Adding an item to the main menu

I haven't edited the file yet, as I don't know which file to edit

I did look at multimenu, but it seemed like a lot of overkill just to add a single main menu item to a pre-existing link.....


Thanks,
Tim

4
stefan88
Re: Adding an item to the main menu
  • 2007/2/28 15:05

  • stefan88

  • Community Support Member

  • Posts: 1086

  • Since: 2004/9/20


To change the menu there are two options:

OPTION I

1. You need to create a template set to work on (you can not work on 'default' template set). If you done that, igore the rest of this point. So go to admin part of XOOPS and System admin -> Templates. Then chose "clone", enter the name of new template set and click "Submit".
Next you need to tell XOOPS to use this template set. So go to System Admin -> Preferences -> General Setings and for "Default template set" option chose the new template set you created, scroll down and click "Go!"
2. Now you need to edit the template for main menu: Go to System Admin -> Templates and from the section of the new template click on list next to System (System [List (27)]). Find "system_block_mainmenu.html" and click edit. You should see something like this:
<table cellspacing="0">
  <
tr>
    <
td id="mainmenu">
      <
class="menuTop" href="<{$xoops_url}>/"><{$block.lang_home}>a>
      
      <{foreach 
item=module from=$block.modules}>
      <
class="menuMain" href="<{$xoops_url}>/modules/<{$module.directory}>/"><{$module.name}>a>
        <{foreach 
item=sublink from=$module.sublinks}>
          <
class="menuSub" href="<{$sublink.url}>"><{$sublink.name}>a>
        <{/foreach}>
      <{/foreach}>
      
    td>
  tr>
table>


add your link above the

part and it will apear in the begining of main menu.

OPTION II

You may make this change in XOOPS_ROOT/modules/system/templates/blocks/system_block_mainmenu.html
and then update system module.

If I remember, there was also an article in the FAQ about all this ...
..

5
Wonderfish1
Re: Adding an item to the main menu

That works to get the link in, but not the text on the main menu.

I added this code:


<{$block.lang_home}>



Another menu section appears, with the correct link, but no text on the menu item.


Any ideas?

6
skenow
Re: Adding an item to the main menu
  • 2007/3/25 1:29

  • skenow

  • Home away from home

  • Posts: 993

  • Since: 2004/11/17


Wonderfish1 wrote:
<
class="menuTop" href="<{$xoops_url}>/modules/news/index.php?storytopic=2"><In Store NOW>a>
Any ideas?


try removing the < and > around your text -
<class="menuTop" href="<{$xoops_url}>/modules/news/index.php?storytopic=2">In Store NOWa>

7
Wonderfish1
Re: Adding an item to the main menu

Great work.

I trying to work this out I seemed to forget what and meant.


Thanks for all.

Login

Who's Online

379 user(s) are online (306 user(s) are browsing Support Forums)


Members: 0


Guests: 379


more...

Donat-O-Meter

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

Latest GitHub Commits