1
Rorie
Adding a plain url link into mainmenu
  • 2009/8/10 6:25

  • Rorie

  • Just popping in

  • Posts: 5

  • Since: 2009/8/7 2


i wish to add a link to my email account to the mainmenu on my site. how do i do this?

2
tcnet
Re: Adding a plain url link into mainmenu
  • 2009/8/10 9:53

  • tcnet

  • Friend of XOOPS

  • Posts: 297

  • Since: 2006/5/12


Add a link to the main menu by editing modules/system/templates/blocks/system_block_mainmenu.html

<table cellspacing="0">
  <
tr>
    <
td id="mainmenu">
      <
class="menuTop" href="<{$xoops_url}>/"><{$block.lang_home}></a>
      <!-- 
start module menu loop -->
      <{foreach 
item=module from=$block.modules}>
      <
class="menuMain" href="<{$xoops_url}>/modules/<{$module.directory}>/" title="<{$module.name}>"><{$module.name}></a>
        <{foreach 
item=sublink from=$module.sublinks}>
          <
class="menuSub" href="<{$sublink.url}>" title="<{$sublink.name}>"><{$sublink.name}></a>
        <{/foreach}>
      <{/foreach}>
      <!-- 
end module menu loop -->
<
class="menuMain" href="yoururl" title="yourlinkname">My Link</a>
    </
td>
  </
tr>
</
table>


Go to system admin - modules and update the system module to set the changes.

Moderators: One of the Most Asked FAQs:
How do I add custom links in the main menu? is displaying a white screen.

3
sailjapan
Re: Adding a plain url link into mainmenu

Quote:
Moderators: One of the Most Asked FAQs: How do I add custom links in the main menu? is displaying a white screen.

Yes, sadly a number of FAQs are broken. We hope to get it sorted in the up-coming site rebuild.

4
Mamba
Re: Adding a plain url link into mainmenu
  • 2009/8/24 10:27

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


OK, this has been finally fixed.

I spent a lot of time looking in the wrong area. Somehow, the answer has been deleted, and when SmartFAQ doesn't find one, it creates a blank screen. I've added the answer from tcnet, and now it's working fine. I've check all answers, and all of them seem to be working now.

If you experience again any blank pages at XOOPS FAQ, please let us know and we'll fix it.

5
sailjapan
Re: Adding a plain url link into mainmenu

Fantastic news! So all FAQs now display and their comments are readable? (have looked through and not found any missing yet!!)

6
Mamba
Re: Adding a plain url link into mainmenu
  • 2009/8/25 5:33

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


As far as I know, all FAQs should be OK, but if I missed any, let me know and we'll try to fix it.

Now, we'll need to stark working on fixing and updating them

7
pinchecl
Re: Adding a plain url link into mainmenu
  • 2009/12/4 13:52

  • pinchecl

  • Friend of XOOPS

  • Posts: 193

  • Since: 2005/4/22


I have this code in my mainmenu:

<table cellspacing="0">
<tr>
<td id="mainmenu">
<a class="menuTop" href="<{$xoops_url}>/"><{$block.lang_home}></a>
<!-- start module menu loop -->
<{if $xoops_isuser}>
<a class="menuMain" href="<{$xoops_url}>/modules/wfdownloads/submit.php" title="submit your work">Submit your work</a>
<{/if}>
<{foreach item=module from=$block.modules}>
<a class="menuMain" href="<{$xoops_url}>/modules/<{$module.directory}>/" title="<{$module.name}>"><{$module.name}></a>
<{foreach item=sublink from=$module.sublinks}>
<a class="menuSub" href="<{$sublink.url}>" title="<{$sublink.name}>"><{$sublink.name}></a>
<{/foreach}>
<{/foreach}>
<!-- end module menu loop -->
</td>
</tr>
</table>

So the purpose is to get the menuitem "Submit your work" just below the Home item.
However, since 2.4.2 I can not get that anymore. I have tried this as well as putting it up in the themes/mytheme/modules/system/blocks directory without any luck. I did update the system module after modifying as well as emptying the cache.
Any suggestions?

8
ghia
Re: Adding a plain url link into mainmenu
  • 2009/12/4 14:30

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Is there any HTML generated?
If you add <!-- test --> after the <{/if}>, does it show in the HTML source?

9
pinchecl
Re: Adding a plain url link into mainmenu
  • 2009/12/4 16:52

  • pinchecl

  • Friend of XOOPS

  • Posts: 193

  • Since: 2005/4/22


Nope, nothing. Looking at the source the line isn't there. Did empty cache and updated system module

10
ghia
Re: Adding a plain url link into mainmenu
  • 2009/12/5 0:40

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Is website / module caching on (see at the end of general preferences)?
Maybe you are working on the wrong theme?
You can also edit it directly in the database: admin - templateset manager, list of system of the templateset and then edit (not for the original set, it must be on a second or cloned set)

Login

Who's Online

186 user(s) are online (114 user(s) are browsing Support Forums)


Members: 0


Guests: 186


more...

Donat-O-Meter

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

Latest GitHub Commits