<![CDATA[ Wayfinder and idx possible? - My Forums]]> https://forums.modx.com/thread/?thread=98451 <![CDATA[Wayfinder and idx possible?]]> https://forums.modx.com/thread/98451/wayfinder-and-possible#dis-post-532455
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"
        href="https://example.com/arts">
      <span property="name">Arts</span></a>
    <meta property="position" content="1">
  </li>
  
  <li property="itemListElement" typeof="ListItem">
    <a property="item" typeof="WebPage"
        href="https://example.com/arts/books">
      <span property="name">Books</span></a>
    <meta property="position" content="2">
  </li>
  
  <li property="itemListElement" typeof="ListItem">
    <a property="item" typeof="WebPage"
        href="https://example.com/arts/books/poetry">
      <span property="name">Poetry</span></a>
    <meta property="position" content="3">
  </li>
</ol>


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?]]>
profilneurotiker Sep 29, 2015, 03:18 PM https://forums.modx.com/thread/98451/wayfinder-and-possible#dis-post-532455
<![CDATA[Re: Wayfinder and idx possible?]]> https://forums.modx.com/thread/98451/wayfinder-and-possible#dis-post-547913
<?php
global $_idx;
if (!isset($_idx)) $_idx = 0;
echo ++$_idx;]]>
yalyoha Jan 10, 2017, 09:21 AM https://forums.modx.com/thread/98451/wayfinder-and-possible#dis-post-547913
<![CDATA[Re: Wayfinder and idx possible?]]> https://forums.modx.com/thread/98451/wayfinder-and-possible#dis-post-532523
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!]]>
profilneurotiker Sep 30, 2015, 03:03 PM https://forums.modx.com/thread/98451/wayfinder-and-possible#dis-post-532523
<![CDATA[Re: Wayfinder and idx possible?]]> https://forums.modx.com/thread/98451/wayfinder-and-possible#dis-post-532522 sottwell Sep 30, 2015, 02:25 PM https://forums.modx.com/thread/98451/wayfinder-and-possible#dis-post-532522 <![CDATA[Re: Wayfinder and idx possible?]]> https://forums.modx.com/thread/98451/wayfinder-and-possible#dis-post-532519
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.]]>
profilneurotiker Sep 30, 2015, 01:59 PM https://forums.modx.com/thread/98451/wayfinder-and-possible#dis-post-532519
<![CDATA[Re: Wayfinder and idx possible? (Best Answer)]]> https://forums.modx.com/thread/98451/wayfinder-and-possible#dis-post-532459
[[+idx]]
. The +idx placeholder does exist in extra getResources which you also can use to build any menu.

When still using Wayfinder maybe the placeholder
[[+menuindex]]
can be an option to you?]]>
donquicky Sep 29, 2015, 05:15 PM https://forums.modx.com/thread/98451/wayfinder-and-possible#dis-post-532459