External link in main menu

Use this forum to ask questions about how to do things in GuMax skin.
Post Reply
User avatar
Berbatov
Rank 1
Rank 1
Posts: 5
Joined: August 7th, 2010, 3:48 pm

External link in main menu

Post by Berbatov »

Does anyone know how to include a external link in the sidebar (at the top in GuMaxDD)? I do not want to have the drop down appear for this link, just a normal link to another website. "http://www.mediawiki.org|Link" just works for level-2 links (**), but I would need a link within the *-items (next to First Item, Second item in the screenshot)...

As I mentioned, I do not want to link to an internal article or anything like it, but to a forum for example which is external.
User avatar
Asahiko
Rank 0
Rank 0
Posts: 3
Joined: August 20th, 2010, 7:36 am
Location: Kyoto, Japan
Contact:

Re: External link in main menu

Post by Asahiko »

The solution I can come up with is going to be pretty ad-hoc, but I hope it works.

First of all, I'm assuming you use GuMaxDD 1.1, because you're speaking of level-1 links, and 1.2 and later does not seem to create links at level-1. (If you're watching, Paul, I actually liked it the old way. How about providing two versions?)

I'm also assuming that you have never edited the files, when I talk about line numbers.

Open GuMaxDD.php and scroll down to line 395. The "foreach" block you see is the loop that creates the menus.

Code: Select all

	<?php foreach ($this->data['sidebar'] as $bar => $cont) { ?>
The foreach-block seems to end at line 412, and the navigation bar (ul) ends at the next line.

Lines 411-415:

Code: Select all

		</li>
<?php	} ?>
	</ul>
<?php
	}
So, if you want to make external links after the menus generated from MediaWiki:Sidebar, you should edit the latter part like this:

Code: Select all

		</li>
<?php	} ?>
	<li><a href="http://example.com/">External_Link1</a></li>
	<li><a href="http://example2.com/">External_Link2</a></li>
	</ul>
<?php
	}
If you want the links before the Sidebar items, add those lines immediately before the loop begins, that is between "<ul id="gumax-nav">" and "<?php foreach ($this->data['sidebar'] as $bar => $cont) { ?>".
User avatar
tormine
Rank 0
Rank 0
Posts: 2
Joined: October 24th, 2010, 6:07 am

Re: External link in main menu

Post by tormine »

Hi

But how about linking the an internal page?? How do I go about doing that in the newest version?
Post Reply