Add top bar

Business template for Joomla 3 and 2.5 ideal to create blog or personal website.
GK User
Sat Aug 25, 2012 2:00 pm
Hi There,

I would like to know how to get a menubar(module position), the same as on this site. (see attachment) on my own website. I use the RealDesign template

Could someone please help me with this?

Regards, Pim
User avatar
Senior Boarder

GK User
Sun Aug 26, 2012 1:40 pm
What I've done.

I add the rule <positions>topmenuleft</positions> and <positions>topmenuright</positions> in templateDetails.xml and I've edited the gk.const.php file located in /lib/framework.

Then I've made a new .php in the folder /layouts/blocks with the name topmenu.php and put the following code into it:

Code: Select all
<?php

// No direct access.
defined('_JEXEC') or die;

?>
<?php if($this->modules('topmenuleft')) : ?>
<div>
<jdoc:include type="modules" name="topmenuleft" style="<?php echo $this->module_styles['topmenuleft']; ?>" />
</div>
<?php endif; ?>

<?php if($this->modules('topmenuright')) : ?>
<div>
<jdoc:include type="modules" name="topmenuright" style="<?php echo $this->module_styles['topmenuright']; ?>" />
</div>
<?php endif; ?>


Now I want to know, where do I place the following code to show this menu. Is this de default.php file? And on which line?
Code: Select all
<?php $this->loadBlock('topmenu'); ?>
?

Im new, so I hope to get some help over here.
User avatar
Senior Boarder

GK User
Sat Sep 01, 2012 7:45 pm
Yes, you should place in the default.php file, but I don't see your attachment so I cannot tell you where exactly you should put it :/
User avatar
Administrator


cron