Карта сайта Интеллектуальная поисковая системаДобавить свою ссылку по ключевому запросуПоисковая система v3.kz поможет ускорить индексацию вашего сайта выводит в Топ |
|
You want to add additional classes or styles to a menu item. The module currently allows you to set the following attributes for each menu item Overriding bootstrap sub theme main menu <ul> class. This is a very simple module that takes the link text of each drupal menu item and adds it as a css class name to the menus <li> element. Using these class names, each menu item can be styled separately with css. Menu Class. Primary tabs. View(active tab). Главная / drupal 7 add class to menu link. Thank you all for your help. Heres the corrected working code to get the tutorial i mentioned in my original post to work with Drupal 7: Note: Im using the main-menu as a block here. But, in normal Drupal menus, the ones that appear in blocks, no such classes appear, which leaves them all with the same style. Print_r($main_menu); each $main_menu items should have this structure: Array( title => xxx, href => xxx, attributes => array(. class => array(xxx), ), ); So you can add class to li by altering $main_menu array. Clone this drupal snippet. Submitted by timonweb on Mon, 05/06/2013 - 11:35. In template.php file add the following snippet (In our case, were adding inline class to ul element of the menu) Техподдержка Drupal. Решение проблем. Собственные классы для тегов ul в меню. Информация взята v3.kz |
загрузка...
|