Código php:
Asi, se genera una lista en html que muestra el menu y ademas, los articulos que esten en el menu activo (class="active")Ver original
<?php if ($page == 0 && module_exists('drigg')) { print drigg_ui_type_menu(); } ?>
Código html:
Esto como es logico lo puedo controlar con un poco de CSS y jQuery para crear las pestañas.Ver original
Ahora es cuando se me complica el inning, la funcion en el modulo que me controla esto es esta:
Código php:
Lo que necesito es lograr que me genere tres listas y me muestre todos los articulos, independientemente del tipo que sea... algo asi:Ver original
<?php /** * Returns the top menu ("published", "upcoming", "archived") * This function ALSO preservs all of the links, whenever possible. * * @return * The top menu */ function drigg_ui_type_menu() { $output = ''; $selected_string = ' class="active" '; $p0 = arg(0); $p1 = arg(1); $p2 = arg(2); // This will make sure that even the home page will work OK if ((arg(0) == 'node' || arg(0)== variable_get('drigg_home_name', 'drigg_home') ) && arg(1) == '' ) { $p0 = 'published'; $p1 = 'newest'; } // This will make sure that even /Section works fine if (drigg_is_section_valid( $p0 ) && $p1 == '' ) { $p0 = 'published'; $p1 = 'newest'; $p2 = arg(0); } // This avoids doing anything if the URL is incorrect if ($p0 != 'published' && $p0 != 'upcoming' && $p0 != 'archived') { return ''; } // Hide the "archived" menu entry, UNLESS you _ARE_ in "archived" if (variable_get('drigg_hide_archived_menu', FALSE) && $p0 != 'archived') { } else { } // For each item, prints it, but with a twist... // At this point, things are "normalised". So, no matter what, // the format is for example published/top24h/Community or // published/top24h foreach ($items as $item ) { $selected = ''; $pp1 = $p1; // Mark it as selected if it's the same as the current one if ($item == $p0) { $selected = $selected_string; } // Last minute change: you can't jump from 'published/top24h' to // 'upcoming/24h'!!! So, if things are not right, fix them on the // spot. From now on, $pp1 needs to be considered, rather than // $p1 // if ($item == 'upcoming' || $item == 'archived') { if ($p1 != 'oldest' && $p1 != 'mostpopular' && $p1 != 'leastpopular') { $pp1 = 'newest'; } } if ($item == 'published') { if ($p1 != 'top7days' && $p1 != 'top24h' && $p1 != 'top30days' && $p1 != 'top365days') { $pp1 = 'newest'; } } // If the link is going to be /published/newest, then change it // last minute to just / if ($item == 'published' && $pp1 == 'newest' && $p2 == '') { $link = drigg_ui_home_url(); // Otherwise, business as normal } else { $link = "$item"; if ($pp1 != '') { $link .= "/$pp1"; } if ($p2 != '') { $link .= "/$p2"; } #$link="/$item" . $pp1 != '' ? "/$pp1/$p2" : ''; } // NOW that link is set, I will add the Drupal's root to it // in case there is one // #$bp = base_path(); #if ($bp != '/') { # $link = substr($bp, 0, -1) . $link; #} $output .= "<li $selected><a ". $selected .' href="'. url($link) .'">'. t($item) .'</a></li>'; } return "<ul class=\"drigg-viewtype\">$output</ul>"; } ?>
Código html:
Y no se como hacerlo... Ver original
Alguien allá afuera con un alma caritativa que me ayude?