Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

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

  • 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
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • 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>

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • 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

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • 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+.

    Add Pages to Vanilla with the Basic Pages app

  • 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'); ?>
    

    Add Pages to Vanilla with the Basic Pages app

  • 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.