<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Menu on Jeremy Jackson</title>
    <link>https://new.tsjee.ru/tags/menu/</link>
    <description>Recent content in Menu on Jeremy Jackson</description>
    <generator>Hugo</generator>
    <language>ru</language>
    <lastBuildDate>Mon, 09 Jan 2012 08:21:56 +0000</lastBuildDate>
    <atom:link href="https://new.tsjee.ru/tags/menu/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Грабли с активными пунктами меню</title>
      <link>https://new.tsjee.ru/posts/2012-01-09-%D0%B3%D1%80%D0%B0%D0%B1%D0%BB%D0%B8-%D1%81-%D0%B0%D0%BA%D1%82%D0%B8%D0%B2%D0%BD%D1%8B%D0%BC%D0%B8-%D0%BF%D1%83%D0%BD%D0%BA%D1%82%D0%B0%D0%BC%D0%B8-%D0%BC%D0%B5%D0%BD%D1%8E/</link>
      <pubDate>Mon, 09 Jan 2012 08:21:56 +0000</pubDate>
      <guid>https://new.tsjee.ru/posts/2012-01-09-%D0%B3%D1%80%D0%B0%D0%B1%D0%BB%D0%B8-%D1%81-%D0%B0%D0%BA%D1%82%D0%B8%D0%B2%D0%BD%D1%8B%D0%BC%D0%B8-%D0%BF%D1%83%D0%BD%D0%BA%D1%82%D0%B0%D0%BC%D0%B8-%D0%BC%D0%B5%D0%BD%D1%8E/</guid>
      <description>&lt;p&gt;Если пункт меню имеет дочерние элементы, то если какой-то из этих элементов активен, то родительский элемент будет иметь класс &lt;strong&gt;active-trail&lt;/strong&gt; и обычно в теме выделен стилями. Так вот бывают такие грабли, пункт активен один, а выделяеться другой родительский пункт! Скорей всего дело в отключеных продублированных дочерних элементах, хоть они и отключены они все равно участвуют во всех обработках меню, кроме вывода.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Добавление классов id меню</title>
      <link>https://new.tsjee.ru/posts/2011-10-24-%D0%B4%D0%BE%D0%B1%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5-%D0%BA%D0%BB%D0%B0%D1%81%D1%81%D0%BE%D0%B2-id-%D0%BC%D0%B5%D0%BD%D1%8E/</link>
      <pubDate>Mon, 24 Oct 2011 04:51:51 +0000</pubDate>
      <guid>https://new.tsjee.ru/posts/2011-10-24-%D0%B4%D0%BE%D0%B1%D0%B0%D0%B2%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5-%D0%BA%D0%BB%D0%B0%D1%81%D1%81%D0%BE%D0%B2-id-%D0%BC%D0%B5%D0%BD%D1%8E/</guid>
      <description>&lt;p&gt;Порой для стилизации меню необходимо каждому пункту свой отлечительный идентификатор, это можно сделать следующим образом:&lt;/p&gt;&#xA;&lt;p&gt;function xakep_menu_link(array $variables) {&#xA;$element = $variables[&amp;rsquo;element&amp;rsquo;];&#xA;$sub_menu = &amp;lsquo;&amp;rsquo;;&#xA;$element[&amp;rsquo;#attributes&amp;rsquo;][&amp;lsquo;class&amp;rsquo;][] = &amp;lsquo;item-&amp;rsquo; . $element[&amp;rsquo;#original_link&amp;rsquo;][&amp;lsquo;mlid&amp;rsquo;];&#xA;if ($element[&amp;rsquo;#below&amp;rsquo;]) {&#xA;$sub_menu = drupal_render($element[&amp;rsquo;#below&amp;rsquo;]);&#xA;}&#xA;$output = l($element[&amp;rsquo;#title&amp;rsquo;], $element[&amp;rsquo;#href&amp;rsquo;], $element[&amp;rsquo;#localized_options&amp;rsquo;]);&#xA;return &amp;lsquo;- &amp;rsquo; . $output . $sub_menu . &amp;ldquo;\n&amp;rdquo;;&#xA;}&lt;/p&gt;&#xA;&lt;p&gt;Правда в примере добавляем класс&amp;hellip;но таким образом можно добавить любой аттрибут. Данный хук прописываеться в &lt;strong&gt;template.php&lt;/strong&gt;. (Хук темы)&lt;/p&gt;</description>
    </item>
    <item>
      <title>Вывод меню в шаблон</title>
      <link>https://new.tsjee.ru/posts/2011-07-26-%D0%B2%D1%8B%D0%B2%D0%BE%D0%B4-%D0%BC%D0%B5%D0%BD%D1%8E-%D0%B2-%D1%88%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD/</link>
      <pubDate>Tue, 26 Jul 2011 07:15:46 +0000</pubDate>
      <guid>https://new.tsjee.ru/posts/2011-07-26-%D0%B2%D1%8B%D0%B2%D0%BE%D0%B4-%D0%BC%D0%B5%D0%BD%D1%8E-%D0%B2-%D1%88%D0%B0%D0%B1%D0%BB%D0%BE%D0%BD/</guid>
      <description>&lt;p&gt;menu_navigation_links(&amp;lsquo;menu-mobile-menu&amp;rsquo;),&#xA;&amp;lsquo;attributes&amp;rsquo; =&amp;gt; array(&#xA;&amp;lsquo;class&amp;rsquo; =&amp;gt; array (&amp;lsquo;mobile-menu&amp;rsquo;),&#xA;),&#xA;)); ?&amp;gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
