xoops forums

Hadesteam

Not too shy to talk
Posted on: 5/16 12:23
Hadesteam
Hadesteam (Show more)
Not too shy to talk
Posts: 158
Since: 2011/9/5 7
#1

Custom link in system menu

I want the main system menu to display a link to a particular article - how do I do it?

Zap_English

Quite a regular
Posted on: 5/16 12:35
Zap_English
Zap_English (Show more)
Quite a regular
Posts: 337
Since: 2016/5/24
#2

Re: Custom link in system menu

my menu or hard coded

you can use mymenu to recreate your entire menu, including the new stuff, and then make the admin menu show only to admin

Hadesteam

Not too shy to talk
Posted on: 5/16 13:19
Hadesteam
Hadesteam (Show more)
Not too shy to talk
Posts: 158
Since: 2011/9/5 7
#3

Re: Custom link in system menu

Problem solved ;)

themes/xbootstrap/modules/system/blocks/system_block_mainmenu.html

<ul class="nav nav-pills nav-stacked">
<
li class="<{if !$block.nothome}>active<{/if}>"><a href="<{xoAppUrl }>" title="<{$block.lang_home}>"><span class="glyphicon glyphicon-home"></span> <{$block.lang_home}></a></li>
<!-- 
start module menu loop -->
    <{foreach 
item=module from=$block.modules}>
    <
li class="<{if $module.highlight}>active<{/if}>">
        <
a href="<{$xoops_url}>/modules/<{$module.directory}>/" title="<{$module.name}>"><span class="glyphicon glyphicon-ok"></span>
            <{
$module.name}>
        </
a>
        <
ul>
            <{foreach 
item=sublink from=$module.sublinks}>
                <
li>
                   <
class="dropdown" href="<{$sublink.url}>" title="<{$sublink.name}>"><{$sublink.name}></a>
                </
li>
            <{/foreach}>
        </
ul>
    </
li>
<{/foreach}>
<!-- 
end module menu loop -->
</
ul>


Just added this code:

<li>
                   <
a href="http://www.kulturystyka.org.pl/modules/news/article.php?storyid=852" title="Programy do ukĹ‚adania diet"><span class="glyphicon glyphicon-ok"></span>
Programy do ukĹ‚adania diety</a>

                </
li>


Results on my site - right menu.

Zap_English

Quite a regular
Posted on: 5/18 13:57
Zap_English
Zap_English (Show more)
Quite a regular
Posts: 337
Since: 2016/5/24
#4

Re: Custom link in system menu

Hard coding links is not a good idea. You should have used mymenu