V
V
Viktor Taran2020-06-12 10:52:17
Drupal
Viktor Taran, 2020-06-12 10:52:17

How to display breadcrumb position in Drupal 6 (schema.org)?

The task is simple but I have never worked with Drupal.

<div itemscope="" itemtype="http://schema.org/BreadcrumbList" id="breadcrumbs">
    {if $_bc}
 			{foreach $_bc.items as $item name=bc}
        {if $smarty.foreach.bc.last || !$item.link}
          <span{if $item.class} class="{$item.class}"{/if}>{$item.title|regex_replace:"/\#D\#/":"%B %Y"|strftime:$smarty.now}</span>
        {else}
            <span itemscope="" itemprop="itemListElement" itemtype="http://schema.org/ListItem">
            <a href="{$item.link}"{if $item.class} class="{$item.class}"{/if} rel="v:url" property="v:title">{$item.title}</a>
                      <span itemprop="name">{$item.title}</span>
                      <meta itemprop="position" content="1">
            </span>
        {/if}
      {/foreach}
    {else}		
    {/if}
    </div>

The question is actually whether it is necessary for them to change or just +1 in the loop, or to pull its real position from Drupal. Thanks in advance position" content="1"

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question