- Navigate to Administer, Site building, Menus.
- Choose the Settings tab.
- Change the “Source for the secondary links” so that it matches the menu that is set in the “Source for the primary links.”
- Scroll to the bottom of the Web page and click “Save configuration.”
The page template variable
$secondary_links now contains the subsection links that have been defined for each of the items in $
primary_links. Referring to the previous example, “Kitten” will now be displayed in the output of
$secondary_links when you select “Mammal” from the list of menu options provided by the variable
$primary_links.
function blog_preprocess_page(&$variables) {
// Make a shortcut for the primary links variables
$primary_links = $variables['primary_links'];
// Loop through the menu, adding a new class for CSS selections
$i = 1;
foreach ($primary_links as $link => $attributes) {
// Append the new class to existing classes for each menu item
$class = $attributes['attributes']['class'] . " item-$i";
// Add revised classes back to the primary links temp variable
$primary_links[$link]['attributes']['class'] = $class;
$i++;
}
// End of the foreach loop
// reset the variable to contain the new markup
$variables['primary_links'] = $primary_links;
} // End of the preprocess function
get help from http://www.informit.com/articles/article.aspx?p=1336146&seqNum=3
nice blog and the selection procedure of the blog is better than others. you can visit my blog as well-- http://furniturestoresbedroom.blogspot.com/
ReplyDeletehttp://technologyforeducationlatest.blogspot.com/