Following we will detail for you how to create a new module position in the header area of your template. This can be usefull when you wish to add a banner or language switcher to the header area of your site.

First of all locate the following line of code in your templates index.php (../templates/[YourTemplate]/index.php)..

<?php require("php/layouts/header.php"); ?>

Directly before this code paste the following..

<div id="newmodule">
	<jdoc:include type="modules" name="newmodule" />
</div>

This will add a module position called newmodule in the header area of your template.

Next we must give the module position some styling to set the positions dimensions, location etc. To do so add the following to the Custom CSS field of your templates parameters..

#header {
	position: relative;
}
#newmodule {
	height:50px; 
	margin:0;  
	padding:0;  
	position: absolute;
	right:20px;
	top:10px;
	width:200px;
	z-index:99;
}

The above styling will create your module position to the top right of your header area. You can edit this CSS to your own taste in particular top, left. height & width under #newmodule. We gave the position absolute positioning relative to the containing #header div. In most cases the top property will be the distance between the top of your module position and the top of the browser window. The right property will be the distance between the right of your module position and the right of the wrapper area of your header. You may also wish to add other properties like color, font-family, background etc.

Other elements can be styled within your new module position by using the same #newmodule selector. An example may be something like..
#newmodule h3 {
	font-size: 18px;
	color: #CCCCCC;
}

And that should be it. You'll find the position won't be listed in the positions dropdown within your modules parameters so simply type it in to create (newmodule).

Join Our Newsletter

* indicates required
We respect your privacy and do not tolerate spam and will never sell, rent, lease or give away your information (name, email, number, etc.) to any third party. Nor will we send you unsolicited email.
Joomla51 - Mullaghmore, Co. Sligo, Ireland
Joomla51.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by
Open Source Matters
the trademark holder in the United States and other countries.

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.

Ok