Adding markup inside first list item of main-menu I need to add some custom markup inside the first list-item of the main-menu as you can see here:

&lt;div id="block-system-main-menu"&gt;
    &lt;div class="block-inner clearfix"&gt;
        &lt;div class="content clearfix"&gt;
            &lt;ul class="menu"&gt;
                &lt;li class="first leaf"&gt;&lt;a href="/de/t1"&gt;Item 1&lt;/a&gt;
                    &lt;div class="my-custom-markup&gt;
                        …
                        …
                    &lt;/div&gt;
                &lt;/li&gt;
                &lt;li class="leaf"&gt;&lt;a href="/de/t2"&gt;Item 2&lt;/a&gt;&lt;/li&gt;
                &lt;li class="last leaf"&gt;&lt;a href="/de/t3"&gt;Item 2&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


With the following code, I can insert the markup:

function mytheme_preprocess_menu_link(&amp;$variables) {
  $variables['element']['#below']['#markup'] = ' &lt;div class="my-custom-markup"&gt;...&lt;/div&gt;';
}


But this code adds the markup to every list-item, not just the first one. Do I use the appropriate function and how can I add the markup only at the first item of main menu?
I managed to apply the code only to the item in the main-menu by introducing a condition of menu-name and #href:

function mymodule_preprocess_menu_link(&amp;$vars) {
  $element = &amp;$vars['element'];
  $my_view = views_embed_view('view_name', 'display_id');
  if(strpos($element['#href'], 'home') !== false &amp;&amp; $element['#original_link']['menu_name'] == 'main-menu')
  {
    $element['#below']['#markup'] = $my_view;
  }
}