Menu options - gtbu/Typesetter5.2 GitHub Wiki
1b : Grundlagen aus dem CMS (output-php - parameters und menu.php)
- Funktions of menu.php :
func GetFullMenu
func GetExpandLastMenu
func GetMenu
func GetSubMenu
func GetTopTwoMenu
func GetBottomTwoMenu
func GetSecondSubMenu
func GetThirdSubMenu
funcGetExpandMenu
func GetMenuArray
By default, menus are output with basic html similar to the following:
<ul class="menu_top">
<li class="li_0 li_title_a">
<a title="Title" href="/">Title</a>
</li>
<li class="li_1 li_title_b">
<a title="Title2" href="/">Title2</a>
</li>
</ul>
- menu_top : You can change the class used for the topmost
- in your template.php file using the $GP_MENU_CLASS global variable:
<div id="menuwrap">
<?php
$GP_MENU_CLASS = 'my_class';
gpOutput::Get('TopTwoMenu');
?>
</div>
- The menus follow a hierarchical ul... li structure, but you can customize the format of the html within each li.../li. For example, if you want a 'span' element within each element you could do the following:
<div id="menuwrap"><br>
<?php
$GP_MENU_LINKS = '<a href="{$href_text}" {$attr}><span class="sub-t">{$label}< /span>< /a>';
gpOutput::Get('TopTwoMenu');
?>
</div>
== Menu options ==
<?php
$GP_ARRANGE = false;
$GP_MENU_CLASSES = array(
'menu_top' => 'nav navbar-nav',
'selected' => '',
'selected_li' => 'active',
'childselected' => '',
'childselected_li' => '',
'li_title' => '',
'haschildren' => 'dropdown-toggle',
'haschildren_li' => 'dropdown',
'child_ul' => 'dropdown-menu',
);
gpOutput::Get('TopTwoMenu'); //top two levels
?>
$GP_MENU_CLASSES = array(
'menu_top' => 'nav',
'selected' => '',
'selected_li' => 'active',
'childselected' => '',
'childselected_li' => '',
'li_' => '',
'li_title' => '',
);
gpOutput::Get('CustomMenu','1,2,0,0');
*** In the pagemanager-menu You can add several classes to LI and ul (menupoint)
== Several independent menus ==
Typesetter allows creation of "several menus":http://typesetter5.bplaced.net/Forumtips-1 in the pagemanger-bottom:
- gpOutput::GetFullMenu('m1'); (m0 is standard)
If You want a different skin : the skin of a higher menu must be changed manually in the top left corner under 'options'