Hallo,
ich bin momentan dabei meinen Blog optisch anzupassen, leider bin ich ein absoluter PHP Vollpfosten, ich kann den Code zwar einigermaßen lesen und verstehen, aber weiß leider keinen Rat wie ich den Code so umstricke das genau das dabei rauskommt was ich möchte. Vielleicht kann mir hier ja jemand helfen :).
Also folgendes möchte ich gerne machen, ich habe folgendes Plugin gefunden
http://www.bjoerne.com/navigation-du-lapin-blanc/?page_id=21
Das Plugin erlaubt es mir Wordpress mehr als CMS einzusetzen, ich kann damit Kategorien an Seiten knüfpen. Meine Vorstellung war eine Top Navigation, bei der dann jeweils eine andere Sub Navigation angezeigt wird. Das ist mit dem Plugin auch möglich, leider kann die Arras Navigationsleiste die in dem Plugin verwendeten Variabeln nicht verstehen.
Wenn ich einfach den Arras Navi Quellcode mit dem von der Internetseite überschreibe funktioniert alles einwandfrei, leider wird die Navigation dann komplett zerschossen.
Daher bräuchte ich entweder Hilfe dabei den Quellcode so umzuschreiben dass die Variabeln in den ins Arras Menü passen
oder
Das Arras Menü mit dem vom Plugin ersetzen und das neue Menü optisch anpassen.
Ich würde mich wirklich sehr über Hilfe freuen :)
EDIT Ich habe hier schonmal die wie ich denke wichtigen Code Schnippsel
Main Navi Plugin
Zitat<ul> [COLOR=#000000]<?php[/COLOR] [COLOR=#b1b100]foreach[/COLOR] [COLOR=#009900]([/COLOR]bjoerne_get_navigation_nodes[COLOR=#009900]([/COLOR][COLOR=#cc66cc]0[/COLOR][COLOR=#009900])[/COLOR] [COLOR=#b1b100]as[/COLOR] [COLOR=#000088]$node[/COLOR][COLOR=#009900])[/COLOR] [COLOR=#009900]{[/COLOR] [COLOR=#000088]$navItemSelected[/COLOR] [COLOR=#339933]=[/COLOR] [COLOR=#009900]([/COLOR][COLOR=#000088]$node[/COLOR][COLOR=#339933]->[/COLOR][COLOR=#004000]is_selected[/COLOR][COLOR=#009900]([/COLOR][COLOR=#009900])[/COLOR] [COLOR=#339933]||[/COLOR] [COLOR=#000088]$node[/COLOR][COLOR=#339933]->[/COLOR][COLOR=#004000]is_on_selected_path[/COLOR][COLOR=#009900]([/COLOR][COLOR=#009900])[/COLOR][COLOR=#009900])[/COLOR][COLOR=#339933];[/COLOR] [COLOR=#b1b100]if[/COLOR] [COLOR=#009900]([/COLOR]bjoerne_is_node_visible[COLOR=#009900]([/COLOR][COLOR=#000088]$node[/COLOR][COLOR=#009900])[/COLOR][COLOR=#009900])[/COLOR] [COLOR=#009900]{[/COLOR] bjoerne_println[COLOR=#009900]([/COLOR][COLOR=#0000ff]'<li class="menuItem'[/COLOR][COLOR=#339933].[/COLOR][COLOR=#009900]([/COLOR][COLOR=#000088]$navItemSelected[/COLOR] ? [COLOR=#0000ff]' menuItemSelected'[/COLOR] [COLOR=#339933]:[/COLOR] [COLOR=#0000ff]''[/COLOR][COLOR=#009900])[/COLOR][COLOR=#339933].[/COLOR][COLOR=#0000ff]'">'[/COLOR][COLOR=#009900])[/COLOR][COLOR=#339933];[/COLOR] bjoerne_print_link[COLOR=#009900]([/COLOR][COLOR=#000088]$node[/COLOR][COLOR=#009900])[/COLOR][COLOR=#339933];[/COLOR] bjoerne_println[COLOR=#009900]([/COLOR][COLOR=#0000ff]'</li>'[/COLOR][COLOR=#009900])[/COLOR][COLOR=#339933];[/COLOR] [COLOR=#009900]}[/COLOR] [COLOR=#009900]}[/COLOR] [COLOR=#000000]?>[/COLOR] </ul>
Top Menu Arras Theme
ZitatAlles anzeigen<div id="top-menu" class="clearfix">
<?php arras_above_top_menu() ?>
<?php
if ( function_exists('wp_nav_menu') ) {
wp_nav_menu( array(
'sort_column' => 'menu_order',
'menu_class' => 'sf-menu menu clearfix',
'theme_location' => 'top-menu',
'container_id' => 'top-menu-content',
'fallback_cb' => ''
) );
}
?>
<?php arras_below_top_menu() ?>
</div><!-- #top-menu -->
Sub Menu Plugin
Zitat<ul> [COLOR=#000000]<?php[/COLOR] [COLOR=#b1b100]foreach[/COLOR] [COLOR=#009900]([/COLOR]bjoerne_get_navigation_nodes[COLOR=#009900]([/COLOR][COLOR=#cc66cc]1[/COLOR][COLOR=#009900])[/COLOR] [COLOR=#b1b100]as[/COLOR] [COLOR=#000088]$node[/COLOR][COLOR=#009900])[/COLOR] [COLOR=#009900]{[/COLOR] [COLOR=#000088]$subNavItemSelected[/COLOR] [COLOR=#339933]=[/COLOR] [COLOR=#009900]([/COLOR][COLOR=#000088]$node[/COLOR][COLOR=#339933]->[/COLOR][COLOR=#004000]is_selected[/COLOR][COLOR=#009900]([/COLOR][COLOR=#009900])[/COLOR] [COLOR=#339933]||[/COLOR] [COLOR=#000088]$node[/COLOR][COLOR=#339933]->[/COLOR][COLOR=#004000]is_on_selected_path[/COLOR][COLOR=#009900]([/COLOR][COLOR=#009900])[/COLOR][COLOR=#009900])[/COLOR][COLOR=#339933];[/COLOR] bjoerne_println[COLOR=#009900]([/COLOR][COLOR=#0000ff]' <li class="menuItem'[/COLOR][COLOR=#339933].[/COLOR][COLOR=#009900]([/COLOR][COLOR=#000088]$subNavItemSelected[/COLOR] ? [COLOR=#0000ff]' menuItemSelected'[/COLOR] [COLOR=#339933]:[/COLOR] [COLOR=#0000ff]''[/COLOR][COLOR=#009900])[/COLOR][COLOR=#339933].[/COLOR][COLOR=#0000ff]'">'[/COLOR][COLOR=#009900])[/COLOR][COLOR=#339933];[/COLOR] bjoerne_print_link[COLOR=#009900]([/COLOR][COLOR=#000088]$node[/COLOR][COLOR=#009900])[/COLOR][COLOR=#339933];[/COLOR] bjoerne_println[COLOR=#009900]([/COLOR][COLOR=#0000ff]' </li>'[/COLOR][COLOR=#009900])[/COLOR][COLOR=#339933];[/COLOR] [COLOR=#b1b100]if[/COLOR] [COLOR=#009900]([/COLOR]bjoerne_equals_nodes[COLOR=#009900]([/COLOR][COLOR=#000088]$node[/COLOR][COLOR=#339933],[/COLOR] bjoerne_get_current_path_element[COLOR=#009900]([/COLOR][COLOR=#cc66cc]1[/COLOR][COLOR=#009900])[/COLOR][COLOR=#009900])[/COLOR][COLOR=#009900])[/COLOR] [COLOR=#009900]{[/COLOR] [COLOR=#b1b100]foreach[/COLOR] [COLOR=#009900]([/COLOR][COLOR=#000088]$node[/COLOR][COLOR=#339933]->[/COLOR][COLOR=#004000]get_children[/COLOR][COLOR=#009900]([/COLOR][COLOR=#009900])[/COLOR] [COLOR=#b1b100]as[/COLOR] [COLOR=#000088]$subNode[/COLOR][COLOR=#009900])[/COLOR] [COLOR=#009900]{[/COLOR] [COLOR=#b1b100]if[/COLOR] [COLOR=#009900]([/COLOR]bjoerne_is_node_visible[COLOR=#009900]([/COLOR][COLOR=#000088]$subNode[/COLOR][COLOR=#009900])[/COLOR][COLOR=#009900])[/COLOR] [COLOR=#009900]{[/COLOR] [COLOR=#000088]$subSubNavItemSelected[/COLOR] [COLOR=#339933]=[/COLOR] [COLOR=#009900]([/COLOR][COLOR=#000088]$subNode[/COLOR][COLOR=#339933]->[/COLOR][COLOR=#004000]is_selected[/COLOR][COLOR=#009900]([/COLOR][COLOR=#009900])[/COLOR] [COLOR=#339933]||[/COLOR] [COLOR=#000088]$subNode[/COLOR][COLOR=#339933]->[/COLOR][COLOR=#004000]is_on_selected_path[/COLOR][COLOR=#009900]([/COLOR][COLOR=#009900])[/COLOR][COLOR=#009900])[/COLOR][COLOR=#339933];[/COLOR] bjoerne_println[COLOR=#009900]([/COLOR][COLOR=#0000ff]' <li class="subMenuItem'[/COLOR][COLOR=#339933].[/COLOR][COLOR=#009900]([/COLOR][COLOR=#000088]$subSubNavItemSelected[/COLOR] ? [COLOR=#0000ff]' subMenuItemSelected'[/COLOR] [COLOR=#339933]:[/COLOR] [COLOR=#0000ff]''[/COLOR][COLOR=#009900])[/COLOR][COLOR=#339933].[/COLOR][COLOR=#0000ff]'">'[/COLOR][COLOR=#009900])[/COLOR][COLOR=#339933];[/COLOR] bjoerne_println[COLOR=#009900]([/COLOR][COLOR=#0000ff]' '[/COLOR][COLOR=#339933].[/COLOR]bjoerne_print_link[COLOR=#009900]([/COLOR][COLOR=#000088]$subNode[/COLOR][COLOR=#009900])[/COLOR][COLOR=#009900])[/COLOR][COLOR=#339933];[/COLOR] bjoerne_println[COLOR=#009900]([/COLOR][COLOR=#0000ff]' </li>'[/COLOR][COLOR=#009900])[/COLOR][COLOR=#339933];[/COLOR] [COLOR=#009900]}[/COLOR] [COLOR=#009900]}[/COLOR] [COLOR=#009900]}[/COLOR] [COLOR=#009900]}[/COLOR] [COLOR=#000000]?>[/COLOR] </ul>
Sub Menü Arras
ZitatAlles anzeigen<div id="nav">
<div id="nav-content" class="clearfix">
<?php
if ( function_exists('pixopoint_menu') ) {
pixopoint_menu();
} elseif ( function_exists('wp_nav_menu') ) {
wp_nav_menu( array( 'sort_column' => 'menu_order', 'menu_class' => 'sf-menu menu clearfix', 'theme_location' => 'main-menu', 'fallback_cb' => 'arras_nav_fallback_cb' ) );
} else { ?>
<ul class="sf-menu menu clearfix">
<li><a href="<?php bloginfo('url') ?>"><?php _e( arras_get_option('topnav_home') ); ?></a></li>
<?php
if (arras_get_option('topnav_display') == 'pages') {
wp_list_pages('sort_column=menu_order&title_li=');
} else if (arras_get_option('topnav_display') == 'linkcat') {
wp_list_bookmarks('category='.arras_get_option('topnav_linkcat').'&hierarchical=0&show_private=1&hide_invisible=0&title_li=&categorize=0&orderby=id');
} else {
wp_list_categories('hierarchical=1&orderby=id&hide_empty=1&title_li=');
}
?>
</ul>
<?php } ?>
<?php arras_beside_nav() ?>
</div><!-- #nav-content -->
</div><!-- #nav -->
Viele Grüße