History of TopBarTutorial
Version 1
TopBarTutorial
a brief tutorial on how to create your own top bar
unfortunately our top bar is not replacable by using the web interface. you need to modify a template file by hand. hopefully this will change very soon...
the top bar is controlled by this template:
for your own convenience, copy the file to your own theme directory
any changes found in this file will override the original file. this way you keep the original file and make upgrading easier. for more information see ThemeTutorial.
now that you have the file there, you can open in with any text editor. for your own convenience, we will maintain the original menu when you are logged in as admin but regular users will only see the custom menu.
after
{code()}
{else}
<this is="" where="" the="" custom="" menu="" goes="">
{/if}
{code}
the custom menu is a simple XHTML unordered list with a few classes set for the links and looks something like this:
{code()}
{code}
the resulting file should look something like this:
{code()}
{strip}
{* this link is for textbrowsers *}
{if $gBitUser->isAdmin()}
{tr}go to top{/tr}
{else}
{/if}
{/strip}
{code}
hope this helps and wish you luck!
please excuse the inconvenience caused.</this>
the top bar is controlled by this template:
<?php
kernel/templates/top_bar.tpl
?>
for your own convenience, copy the file to your own theme directory
<?php
themes/styles/<style>/kernel/top_bar.tpl
?>
any changes found in this file will override the original file. this way you keep the original file and make upgrading easier. for more information see ThemeTutorial.
now that you have the file there, you can open in with any text editor. for your own convenience, we will maintain the original menu when you are logged in as admin but regular users will only see the custom menu.
after
insert:
{code()}
{if $gBitUser->isAdmin()}
{code}
and before the last
insert:{code()}
{if $gBitUser->isAdmin()}
{code}
and before the last
{code()}
{else}
<this is="" where="" the="" custom="" menu="" goes="">
{/if}
{code}
the custom menu is a simple XHTML unordered list with a few classes set for the links and looks something like this:
{code()}
{code}
the resulting file should look something like this:
{code()}
{strip}
{* this link is for textbrowsers *}
{if $gBitUser->isAdmin()}
{tr}go to top{/tr}
- {tr}{$siteTitle|default:"Home"}{/tr}
{foreach key=key item=menu from=$appMenu}
{if $menu.title && $menu.titleUrl && $menu.template}
{tr}{$menu.title}{/tr}
{if $gBitSystemPrefs.feature_top_bar_dropdown eq 'y'}
{ include file="`$menu.template`"}
{/if}
{/if}
{/foreach}
{if $gBitUser->isAdmin()}
{tr}Administration{/tr}
{if $gBitSystemPrefs.feature_top_bar_dropdown eq 'y'}
{foreach key=key item=menu from=$adminMenu}
{tr}{$key|capitalize}{/tr}
{ include file=`$menu.tpl`}
{/foreach}
{tr}Layout and Design{/tr}
{ include file="bitpackage:kernel/menu_layout_admin.tpl"}
{/if}
{/if}
{else}
{/if}
{/strip}
{code}
Note: i had to insert a space between { and include due to the include plugin. please don't copy and paste the above without fixing that.
hope this helps and wish you luck!
please excuse the inconvenience caused.</this>