• Notice: Trying to access array offset on value of type int в функции element_children() (строка 6595 в файле /home/opgnylyd/public_html/includes/common.inc).
  • Notice: Trying to access array offset on value of type int в функции element_children() (строка 6595 в файле /home/opgnylyd/public_html/includes/common.inc).
  • Notice: Trying to access array offset on value of type int в функции element_children() (строка 6595 в файле /home/opgnylyd/public_html/includes/common.inc).
  • Notice: Trying to access array offset on value of type int в функции element_children() (строка 6595 в файле /home/opgnylyd/public_html/includes/common.inc).
  • Notice: Trying to access array offset on value of type int в функции element_children() (строка 6595 в файле /home/opgnylyd/public_html/includes/common.inc).
  • Notice: Trying to access array offset on value of type int в функции element_children() (строка 6595 в файле /home/opgnylyd/public_html/includes/common.inc).
  • Notice: Trying to access array offset on value of type int в функции element_children() (строка 6595 в файле /home/opgnylyd/public_html/includes/common.inc).
  • Deprecated function: The each() function is deprecated. This message will be suppressed on further calls в функции _menu_load_objects() (строка 579 в файле /home/opgnylyd/public_html/includes/menu.inc).
  • Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters в функции drupal_get_feeds() (строка 394 в файле /home/opgnylyd/public_html/includes/common.inc).

Добавление уникального класса каждому пункту меню

31 Окт 2016
Раздел: 

Описание

Добавление уникального класса для каждого пункта меню для тем Друпала 7, с помощью функции в файле template.php. Может понадобиться, например, для обозначение каждого пукта меню своим цветом и т.д.

Решение

Пепеопределяем функцию theme_menu_link(array $variables) в файле template.php. ВАША_ТЕМА - название вашей темы, а класс будет добавляться для тега li, и будет иметь вид - menu-[уникальный ID].

  1. function ВАША_ТЕМА_menu_link(array $variables) {
  2.         $element = $variables['element'];
  3.         $sub_menu = '';
  4.         $element['#attributes']['class'][] = 'menu-' . $element['#original_link']['mlid'];
  5.         if (
  6.                 $element['#below']) {
  7.                         $sub_menu = drupal_render($element['#below']);
  8.                 }
  9.         $output = l($element['#title'], $element['#href'], $element['#localized_options']);
  10.         return '<li' . drupal_attributes($element['#attributes']) . '>' . $output . $sub_menu . "</li>\n";
  11. }

Комментарии

MichaelWresy 8 Фев 2020
Человек столько раз умирает, сколько раз теряет своих близких. -------- <a href=https://avenue17.ru/pro>розлив воды в пэт</a> | https://avenue17.ru/
EdwardCap 13 Фев 2020
It is the true information -------- <a href=https://www.virt4me.com/categories/>https://www.virt4me.com/categories/</a> | https://www.virt4me.com
cialis online 11 Авг 2020
want to buy real isotretinoin groneeIngeme https://ccheapcialisl.com/ - purchase cialis online Eruple What Is Amoxicillin Bp emappy <a href=https://ccheapcialisl.com/#>buy cialis 5mg online</a> Fruilm Amoxicillin Merck
cheap cialis online pharmacy 19 Авг 2020
Online Parmasudical Company Viagra assuhotherse https://cialiser.com/ - Cialis slalmstirl Buy Propecia Online Forum SimeStuplilt <a href=https://cialiser.com/#>Cialis</a> TakBladial Cialis Kaufen Vergleich
Maximuszau 20 Авг 2020
удалите,пожалуйста! <a href=https://fastreklama.ru/>.</a>
JaEmemy 1 Ноя 2020
<a href=https://megaremont.pro/fryazino-restavratsiya-vann>Реставрация ванн вкладышем в Мытищах</a>
exernemes 19 Дек 2020
Amoxil 500mg Food assuhotherse <a href=https://bansocialism.com/>safe place to buy cialis online</a> slalmstirl kamagra shelf life
Vermeer 3 Сен 2021
Aviation complex for air defense suppression Transport aircraft have a large payload, flight range, simple piloting, and are capable of refueling in the air. This is an excellent platform for creating strike complexes for air defense, coastal defense, and ship groups. This is the basis for the so-called "long arm". Range of up to 2-3 thousand kilometers and more. A large cargo bay accommodates a significant arsenal of air-to-air or air-to-surface missiles. Wide rear flaps make it easy to air missiles. https://neoengineering.blogspot.com/
exernemes 22 Дек 2020
Pharmacie Viagra assuhotherse <a href=https://bansocialism.com/>buy liquid cialis online</a> slalmstirl Buy Now Amoxicilina No Script Needed
masturbaza 3 Мар 2021
I am final, I am sorry, but it at all does not approach me. Perhaps there are still variants? ------- <a href=https://www.masturbaza.com/mature-latin-maid-get-her-big-ass-pounded-by-black-teen/>https://www.masturbaza.com/mature-latin-maid-get-her-big-ass-pounded-by-black-teen/</a> | https://www.masturbaza.com/
vulpyx 3 Мар 2021
I recommend to you to come for a site on which there are many articles on this question. ------- <a href=https://www.vulpyx.com/mary-ann-milf-swinger-part-1/>https://www.vulpyx.com/mary-ann-milf-swinger-part-1/</a> | https://www.vulpyx.com/
DaHouts 5 Мар 2021
Извините, я удалил эту фразу ------ <a href=https://poker-helper.com>i poker helper</a> Это интересно. Вы мне не подскажете, где мне узнать больше об этом? ------ <a href=https://partnersmelbet.com/>melbet partners</a> По моему мнению Вы ошибаетесь. Могу это доказать. ------ <a href=https://ivoireparis.com/>betwinner inscription</a> Это — неожиданность! ------ <a href=https://kenya-bets.com/>betika com kenya</a> Я считаю, что Вы не правы. Давайте обсудим это. Пишите мне в PM, поговорим. ------ <a href=https://muzparty.net/7808-jony-la-cometa-skachat.html>https://muzparty.net/7808-jony-la-cometa-skachat.html</a> Отличный ответ ------ <a href=https://tekhosmotr.online/>проверить диагностическую карту по номеру</a> Это же урбанизация какая-то ------ <a href=https://affiliate1xbet.com/>1xpatners</a> Говорите прямо. ------ <a href=https://joycasino-oficialniy-sayt.com/>джой казино официальный сайт</a> Да уж, спасибо ------ <a href=https://global-smm.ru/freelikes>freelikes</a> да дофига он стоет... ------ <a href=https://jubi-opt.com.ua/products/1-Noski-Optom>носки оптом украина от производителя </a>
Kenni 3 Сен 2021
Первые два полученных ВВС Катара учебно-боевых самолета ВАЕ Systems Hawk Mk 167 (британские военные номера ZB131 и ZB133, катарские бортовые номера QA01 и QA03), поступившие в состав совместной британско-катарской учебной эскадрильи (Joint Qatar Emiri Air Force-RAF Hawk Training Squadron) на британской авиабазе Лиминг, 01.09.2021 (с) Anthony Hurson http://oflameron.com/sitemap.htm
joycasinoofficial 7 Мар 2021
So happens. Let's discuss this question. Here or in PM. ------- <a href=https://joycasinoofficial.site/>https://joycasinoofficial.site/</a> | https://joycasinoofficial.site/
msk-stabilizator22 10 Мар 2021
Я думаю, что Вы не правы. Могу отстоять свою позицию. ----- <a href=https://msk-stabilizator.ru/cat.php?cat=instab>инверторные стабилизаторы напряжения</a> https://msk-stabilizator.ru/
Rorulky 20 Мар 2021
<a href=https://megaremont.pro/tyumen-restavratsiya-vann>Тюмень реставрация эмали ванн</a>
Lelik 3 Сен 2021
The diameter of the shaped charge can exceed 1 meter for large bombs and ensure the destruction of granite to a depth of 10 meters or more. The diameter of the inlet can be increased by using an additional charge, which is triggered already at a depth of 10-15 centimeters in front of the entrance of the head of the bunker bomb. This design increases the length of the projectile and the weight, but for a bomb weighing several tons, this will be a small addition. With external suspension of the device on an aircraft, such an increase in length is not critical. https://neoengineering.blogspot.com/2021/08/teoretical-engineering_21.html When using a shaped charge of a large diameter, it is possible to achieve a borehole diameter of up to 10 centimeters and a length of more than 10 meters, which will significantly reduce friction and destruction of the head part in this area. When using a bomb against reinforced concrete, the cumulative jet will effectively destroy not only the concrete, but also the reinforcement and armor plates. For a more significant increase in the depth of application of the device, it is necessary to use the exact hit of the second block in the created well. This is a technically difficult task that can be solved by using several technical solutions in the tail section of the first bomb and special modules for the second one.
lycleri 20 Апр 2021
http://ponlinecialisk.com/ - cialis otc
exernemes 8 Май 2021
<a href=http://ponlinecialisk.com/>cheap cialis
Popesky 7 Сен 2021
Zkusíme ze smartphonu udělat WEB kameru se službou FTP. Napíšeme speciální aplikaci pro Android, která pořídí fotografie podle plánu a nahraje je na FTP server. Napíšeme zdrojové kódy pro všechny prvky aplikace ("Rescue PHOTO"), přidáme komentáře, screenshoty a průvodce pro programátora. Začněme ale něčím jiným. Proč staré smartphony a proč FTP server. 1. Existuje spousta starých smartphonů Android. Jsou velmi levné. Rozbité pouzdro nebo poškrábaná obrazovka nevadí. Ani stará baterie smartphonu neomezuje provoz WEBOVÉ KAMERY. Napájecí zdroj připojíme do elektrické zásuvky nebo externí baterie. 2. Mnoho bezplatných webových hostitelů má přístup FTP ke stahování souborů. To je to, co potřebujeme. Vytvoříme speciální webovou stránku pro prohlížení fotografií odkudkoli na světě. Získáte jednoduchý a levný systém pro sledování vašeho domova, kanceláře, obchodu, skladu, parkoviště, auta. 3. Naučíte se programovat pro Android. A váš první program bude mít komerční potenciál. http://vallumn.simplesite.com/450448461
fralleste 13 Июн 2021
<a href=http://ponlinecialisk.com>buy cialis and viagra online
fralleste 21 Июл 2021
<a href=https://cialiswwshop.com/>cheap generic cialis</a>
Teoretical 3 Сен 2021
For the destruction of underground bunkers, special bombs of great length and weight, sometimes consisting of a large amount of heavy metals, have been created. They can penetrate many tens of meters into the ground. But bunkers are being built deeper and deeper. And the capabilities of anti-bunker bombs have to be increased making them longer, heavier and faster. But the size and weight of the bomb is limited by the capabilities of the aircraft, and old ballistic missiles can be used to further increase the speed. However, even this does not allow us to fundamentally increase the depth of destruction of objects under the ground. An interesting option is the second bomb hitting the trail of the first shell. It is very technically difficult. The hole is very small and the bomb drop height is large. Here, the accuracy of indicating the coordinates of GPS or GLONASS is not enough. One of the options is to use a special radio beacon in the bottom of the first shell, which remains in the upper part of the mine. A few meters from the surface of the earth. The radiation of the radio beacon should be in several ranges. When the second projectile approaches, radiation with a higher frequency is used for accurate target designation. The second projectile Uses microwave direction finders in the final phase of the flight until it hits the hole. The large mass and speed of the second projectile make it possible to compensate for a small miss. After hitting the ground, the projectile will "slide" towards the shaft made by the first charge. A microwave marker can provide an accuracy of several decimeters. The big difficulty in accurately targeting the anti-booker bomb at the final stage is its moment of inertia. It is necessary to have time to accurately bring the bomb into the opening of the shaft at the last second of the flight. To do this, you can use small rocket motors that run only once. The necessary impulse is created by choosing the number of motors. https://neoengineering.blogspot.com/2021/08/teoretical-engineering.html Another way to increase the kinetic energy of an anti-bunker bomb is to increase mass, length and speed without using an aircraft. If you use a ballistic missile with a bomb instead of the upper missile stage. Those. instead of a two-stage rocket, you get a single-stage rocket with a bunker bomb warhead.
ecoClunc 2 Авг 2021
https://eco-corporation.ru - Автономная канализация в самаре под ключ цена Для вас мы предлагаем высококлассные сервис по монтажу автономной канализации под ключ, владеем исключительной методикой и частным подходом к работе. Наша международная компания занимается не только лишь проектированием и сборкой, профессионалы дополнительно делают последующее сопровождение автономной канализации. Обеспечиваем лучший завершающий результат Автономная канализация цена под ключ-это сегодня наш профиль Автономная канализация в частном помещении - лучший выбор от компанииСборка септика - изрядно непростой процесс, предполагающий не только лишь строительство, но и дополнительно выбор нужной системы.
fralleste 7 Авг 2021
<a href=http://cialiswwshop.com/>where can i buy cialis on line</a>
Esxemple 3 Сен 2021
Imagine a bunker bomb with 10-12 tons of internal weight and 10 meters long. Larger and more efficient bombs have not been made for several reasons. For example, they cannot be used by existing aircraft due to their size. If old solid-propellant missiles are used as a "carrier", much heavier and longer bunker bombs can be made. From a solid-propellant ballistic missile, the first (most powerful) stage is used. This immediately reduces the missile's range and removes it from international restrictions. For example, a missile will have a range of 495 kilometers. At the same time, the launch altitude will reach 30-50 kilometers. When the projectile falls from such a height, the boib will additionally accelerate to high supersonic speeds (hypersonic). Such a bomb would have colossal kinetic energy. But there is an essential difficulty here. The strength of tungsten carbide or depleted uranium is not infinite. At high speeds, the device may begin to evaporate too early - as soon as it enters the surface. This can be a significant obstacle to increasing kinetic energy by increasing the speed of the projectile. https://neoengineering.blogspot.com/2021/08/teoretical-engineering.html There are technical ideas for "stretching" the process of hitting the surface of the projectile over time. And there are at least two such technical regulations.