We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35756
    • 166 Posts
    Hi there!

    I'm trying to add the rich-snippet breadcrumb via the wayfinder call, because the project/site itself doesn't use "real" breadcrumbs.

    So far I edited the outerTpl and the rowTpl, but now I have to add an id for the meta-property-part:

    <ol vocab="http://schema.org/" typeof="BreadcrumbList">
      <li property="itemListElement" typeof="ListItem">
        <a property="item" typeof="WebPage"
          <span property="name">Arts</span></a>
        <meta property="position" content="1">
      <li property="itemListElement" typeof="ListItem">
        <a property="item" typeof="WebPage"
          <span property="name">Books</span></a>
        <meta property="position" content="2">
      <li property="itemListElement" typeof="ListItem">
        <a property="item" typeof="WebPage"
          <span property="name">Poetry</span></a>
        <meta property="position" content="3">

    I tried using this:

    <meta property="position" content="[[+idx]]">

    but this seems not to work, the [[+idx]] part is empty.

    Isn't idx is implemented/usable this way?

    This question has been answered by donquicky. See the first response.

    • discuss.answer
      • 37105
      • 194 Posts
      As far as I know, Wayfinder does not support
      . The +idx placeholder does exist in extra getResources which you also can use to build any menu.

      When still using Wayfinder maybe the placeholder
      can be an option to you?
        Codeplaza Webdesign: for professional websites at low cost
        • 35756
        • 166 Posts
        Hi DonQuickie!

        Thank you for your reply...

        My researches resulted in the same, idx is not available by using wayfinder. I thought about creating a template-variable, but your suggestion to use the menuindex looks even better to me! Thanks for pointing me to that.

        Btw....I tried the Google-structured-data-testing-tool even without using the meta-property-position-line, and the test has been successful. So I think it's not necessary to add this line to each li-element.

        I also didn't think about using getResources to create the menu, but yeah, this would be an option as well.

        Thanks again.
        • Or you can use pdoTools. It provides an idx placeholder for all of its snippets.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 35756
            • 166 Posts
            Hi Susan!

            Thanks for your reply as well.

            And yeah, I found this during my researches too, but somehow I wanted to stick to wayfinder instead of using pdoTools for the first time. But this surely works too!
              • 53139
              • 1 Posts
              Сниппет: Idx

              global $_idx;
              if (!isset($_idx)) $_idx = 0;
              echo ++$_idx;