We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32678
    • 290 Posts
    Pulling my hair out over what should be default behavior, but isn't...

    I have a single Articles container, and in the rowTpl use this code to list the tags applied to each post:
    Posted in [[+tv.articlestags:notempty=`[[!tolinks? &items=`[[+tv.articlestags]]` &tagKey=`articlestags` &target=`[[*id]]` &cls=`postTags`]]


    On the post page, I want to list tags applied to that resource, and use the sample template's default code:
    Posted in [[*articlestags:notempty=` [[+article_tags]]`]]


    Note that in the row template, I set the tagKey to "articlestags". Otherwise, the key defaults to "tags", which produces no output when you click through on the tag link. Why? Because the TV is named 'articlestags'.

    So here's my basic question -- why does default code within the sample template, structured to list the tags of the current post, produce incorrect results???? It's output has the key "tags", but according to the documentation, the articles_tags placeholder "contains a list of all tags that the current article has been tagged with" and as far as I can tell, the TV is named articlestags.

    I have rooted through the placeholders, along with dozens of forum posts, and cannot sort this out.

    What am I doing wrong? Please help - thanks! [ed. note: wpicotte last edited this post 9 years, 10 months ago.]
      • 32678
      • 290 Posts
      I figured out a different route using tolinks.

      I would still love to know why the article_tags placeholder is outputting the key "tags", when it should be "articlestags". Or whether I have this wrong altogether.

      Anyone?
        • 20413
        • 2,877 Posts
          @hawproductions | http://mrhaw.com/

          Infograph: MODX Advanced Install in 7 steps:
          http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

          Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
          http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
          • 32678
          • 290 Posts
          Quote from: mrhaw at Jun 12, 2014, 09:30 PM
          See this answer: https://github.com/splittingred/tagLister/issues/17


          Thanks - this is basically what I figured out, but it still doesn't explain the mismatch between what the Articles documentation states about the articles_tags placeholder, and what actually happens.

          LOVE ModX -- if an idiot like me can do what I've done with it, it has to be awesome. And thank you ModX community 'cause I never could have done it without you. But please please please develop real documentation, especially for core add-ons like Articles!