How to use itemprop in breadcrumbs

I have recently added this code <?php echo Gdn_Theme::Breadcrumbs( $this->Data('Breadcrumbs') ) ?> in default.master.php to show breacrumbs. Where do I add this code <span class="Breadcrumbs" itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><span class="Crumb"> &rsaquo; </span><span itemprop="title">{$Title}</span></span> Please advice?

Vanilla Version : Version 2.0.18.8

Tagged:

Comments

  • Where do you want it to show ?

  • peregrineperegrine MVP
    edited October 2013

    I assume he wants this

    itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"

    added.

    otherwise he would just add

      <div id="Breadcrumbs"><?php echo Gdn_Theme::Breadcrumbs( $this->Data('Breadcrumbs') ) ?></div>
    
    below the Body field in the default.master.php
    
  • Correct, @peregrine . Thanks

    @peregrine said:
    I assume he wants this

    itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"

    added.

    otherwise he would just add

      <div id="Breadcrumbs"><?php echo Gdn_Theme::Breadcrumbs( $this->Data('Breadcrumbs') ) ?></div>
    
    below the Body field in the default.master.php
    
  • peregrineperegrine MVP
    edited October 2013

    was that correct in the assumption

    or correct in that solved your problem?

    answering an either or with correct is confusing to say the least.

    perhaps
    <div id='Breadcrumbs itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"'><?php echo Gdn_Theme::Breadcrumbs( $this->Data('Breadcrumbs') ) ?></div>

  • Thanks peregrine. Is there a way to show title at the end of breadcrumbs.

  • peregrineperegrine MVP
    edited October 2013

    I think it has all been said before here:

    http://vanillaforums.org/discussion/24268/breadcrumbs

  • shashashasha New
    edited October 2013

    Thanks, I tried that code but title is not getting called. Getting error like this :

  • {$Title} is a Smarty tag that can only be used in the default.master.tpl file in Vanilla 2.1+.

  • Any advice on which code to use on Version 2.0.18.8

    @Shadowdare said:
    {$Title} is a Smarty tag that can only be used in the default.master.tpl file in Vanilla 2.1+.

  • Try this to print the title of the page:

    <?php echo $this->Data('Title'); ?>
    
  • It worked, Thanks :)

    @Shadowdare said:
    Try this to print the title of the page:

    <?php echo $this->Data('Title'); ?>
    
  • I recently tested my website on google snippet testing tool but its unable to detect any RDFa or structured data. Please advise.

Sign In or Register to comment.