Custom Site Header
Activating the Custom Site Header
- Go to Admin panel >> feature Look and Feel (tiki-index.php?page=look) >> tab General Layout options and click checkbox Custom Site Header on.
Example for Using the Custom Site Header for a Site Logo with a Navigation Menu
For other example, how to use the Custom Site Header adding a banner logo to your site see: Look and Feel.
- Create a horizontal navigation menu you would like to use for the top bar.
- For information how to configure this menu see : Menu.
- Note : To display the horizontal menu, CSS (suckerfish) menus have to be turned on in: Admin General >> Navigation.
- Now insert the code for your image and the new navigation menu in the box for the custom site header.
The following code describes an image (your site logo) with a self created user menu beside, both at the top of your site.
<DIV class="custom_hdr"> <A href="http://www.mywebsite.com"><IMG src="img/wiki_up/logo.gif" class="custom_hdr_img" alt="My Logo" title="Welcome to my website"></A> {if $user neq ''} <DIV style="margin-left: 200px"> {menu id=43 css=y type=horiz} </DIV> {/if} </DIV>
Code author : Darkbee
Cause of if $user neq the menu is only shown, if the username is set, for example when the user is logged in. Anonymous visitors so won't see this menu at all.
- If you don't need this function, leave if $user neq off.
- For an other solution, restricting the visibility of the several navigation buttons in the menu for visitors and/or users see : Top Bar.
The class "custom_hdr" serves to control more precisely the different aspects of the custom header you want to define. The CSS class sits then in the CSS of the theme you are using. Alternatively you can place the CSS style definitions in the custom header code itself without defining a custom header CSS class.
To show the site logo and the menu items on the same level / in the same line you have to float the image. This can be done by writing the float style directly in the custom site header or using a separate CSS file like mentioned before.
The following code let's appear the site logo and the menu items on the same level :
<IMG src="img/path/logo.gif" style="float: left;">{menu id=43 css=y type=horiz}
Code author : Darkbee
Thanks to Darkbee for this support !
For more explanations see the forum thread :
Navigation bar using Custom Site Header.