title: Adding microdata or schema.org for breadcrumb SEO in Drupal 7
body: <p>I'm currently a little confused about microdata and schema.org. <strong>Is microdata and schema.org the same?</strong> I read the <a href="http://support.google.com/webmasters/bin/answer.py?answer=185417&amp;topic=1088474" rel="noreferrer">Google</a> and <a href="http://onlinehelp.microsoft.com/en-us/bing/hh207238.aspx" rel="noreferrer">Microsoft</a> documentation, but that didn't helped me to get the difference between this two names.</p>
  
  <p>So far I understood this I have produced this HTML code:</p>
  
  <pre><code>&lt;span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"&gt;
   &lt;a href="/" itemprop="url"&gt;&lt;span itemprop="title"&gt;My Page&lt;/span&gt;&lt;/a&gt;
  &lt;/span&gt;
  &lt;span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"&gt;
   &lt;a href="/cat1" itemprop="url"&gt;&lt;span itemprop="title"&gt;Category 1&lt;/span&gt;&lt;/a&gt;
  &lt;/span&gt;
  &lt;span itemscope itemtype="http://data-vocabulary.org/Breadcrumb"&gt;
   &lt;a href="/cat1/content" itemprop="url"&gt;&lt;span itemprop="title"&gt;Content&lt;/span&gt;&lt;/a&gt;
  &lt;/span&gt;
  </code></pre>
  
  <p>In my opinion too much overhead but okay if the search results look nice. <strong>Is it possible to reduce the count of html code?</strong></p>
  
  <p>Also if I don't need that <strong>how does the search engines detect two different trails?</strong></p>
  
  <p>My next problem is that I want to apply this format to the drupal breadcrumps. I found on the web <a href="http://drupalbin.com/19863" rel="noreferrer">this fix</a> which I tried to include to my own SEO module like this:</p>
  
  <pre><code>function mymod_page_alter(&amp;$variables) {
      if (!isset($variables['breadcrumb'])) {
          $variables['breadcrumb'] = theme('my_microdata', array('breadcrumb' =&gt; drupal_get_breadcrumb()));
      }
  }
  function mymod_theme($existing, $type, $theme, $path) {
    return array(
      'my_microdata' =&gt; array(
       'variables' =&gt; array('breadcrumb' =&gt;array()),
      ),
    );
  }
  function mymod_menu_breadcrumb_alter(&amp;$active_trail, $item){
    foreach($active_trail as $id=&gt;$active_trail_item){
      $active_trail[$id]['localized_options']['attributes']['itemprop'][]="url";
    }
  }
  function theme_my_microdata($variables){
   $breadcrumb=$variables['breadcrumb'];
  print_r(debug_backtrace());
   $output="*+*+*+*+*";
    if (!empty($breadcrumb)) {
      // Provide a navigational heading to give context for breadcrumb links to
      // screen-reader users. Make the heading invisible with .element-invisible.
      $output = '&lt;h2 class="element-invisible"&gt;' . t('You are here') . '&lt;/h2&gt;';
      $output .= '&lt;div class="breadcrumb"&gt;';
      $separator="";
      foreach($breadcrumb as $breadcrumb_item){
        $output.='&lt;span typeof="datav:Breadcrumb"&gt;'.$separator.$breadcrumb_item."&lt;/span&gt;";
        $separator="»";
      }
      $output .='&lt;/div&gt;';
    }
  
      return $output."xXxXxXx";
  }
  </code></pre>
  
  <p>So far I checked that all this code is executed. But this theming is not applied on my page. <strong>Why does that code not work?</strong> Could this been related with the module <code>breadcrumb</code>? I know that this output will be garbage but I cannot see the result.</p>
  
  <p>If I guess right than is the output created by <em>theme.inc</em> line 1682ff <code>theme_breadcrumb(...)</code>instead of my code.</p>
  
  <p>It would be nice if somebody could help me, also if you don’t know all answers of my questions!</p>