We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28000 ☆ A M B ☆
    • 397 Posts
    I have been wrestling with a project that has 3 separate articles containers. In the footer I want to be show the latest tags from all three mixed into one list.

    I tried using separate placeholders, but I am getting no result.

        [[!Articles? &container=`2` &placeholderPrefix=`taglist1`]]
        [[!Articles? &container=`6` &placeholderPrefix=`taglist2`]]
        [[!Articles? &container=`7` &placeholderPrefix=`taglist3`]]
            
            [[+taglist1.tags]]
            [[+taglist2.tags]]
            [[+taglist3.tags]]


    Anyone know what I am doing wrong?

    Thanks!

      Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.
      • 9207 ☆ A M B ☆
      • 2,475 Posts
      Does is work if you use only one call on the page? E.g. does this work by itself?

      [[!Articles? &container=`7` &placeholderPrefix=`taglist3`]]
      [[+taglist3.tags]]


      You may try uncaching the placeholder:
      [[!+taglist3.tags]]


      I don't think that's the problem, but there are some conditions where you can get some weird results if the Snippet is cached but the placeholder is not. In general, it's best to uncache the placeholder if the Snippet is also uncached.
        • 42562
        • 1,145 Posts
        Hi,

        Got it to work yet? perhaps this little input will help?

        I think your &placeholderPrefix is missing a necessary dot at the end:
        &placeholderPrefix=`taglist1.`
        &placeholderPrefix=`taglist2.`
        &placeholderPrefix=`taglist3.`

        Plus,
        Better to place each taglist placeholder right immediately after its respective mother Article snippet placeholder:
        [[Articles? &container=`2` &placeholderPrefix=`taglist1.`]]
          [[+taglist1.tags]]
        
        [[Articles? &container=`6` &placeholderPrefix=`taglist2.`]]
          [[+taglist2.tags]]
        
        [[Articles? &container=`7` &placeholderPrefix=`taglist3.`]]
          [[+taglist3.tags]]


        Notes:

        1. No need to call the Article snippet uncached
        2. Make sure these calls are in the same context as the Article Containers

        Do well!
        Cheers!
          TinymceWrapper: Complete back/frontend content solution.
          Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
          5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
          • 28000 ☆ A M B ☆
          • 397 Posts
          Hi guys,

          Thanks for all of your tips. Yeah the code from Don Shakespeare (if that's your real name smiley ) worked. It works now as expected. The only drawback is that if you have similar tags in different instances, they will not be counted together. So if you have in instance one the tag "Munich" and in instance 2 the tag "Munich" they are counted as separate tags - which is logical as the different instances do not communicate with one another - and both will be listed as Munich (1), instead of Munich (2) had they been in the same instance.
            Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.
            • 42562
            • 1,145 Posts
            Yea, Articles Extra has got something going on there. Its tags really belong to a TV, don't they, articlestags? Being such, I'm sure you could build your own tag system the semi native way, using taglister tolinks and so forth. You'll probably have a better chance of grouping your tags more accurately, or should I say, more to your desire.

            Taglister is not my forte, I am just throwing out the idea for you to carry. I am 230% sure it is possible and easier than it portends. Well, this is MODx, right?

            First, this is how I would mix up my blog entries in a category, Sonnets, drawn from several Articles Containers. You could even build several landing pages (a bit cumbersome), each pointing to a Category. Have a link to that category and a count of the resources in brackets. Sonnets (34). This would be a run-around-away of doing it. I think it is easy to count resources.....I don't have a code for it here. In all though, you'd have complete control.
            <ul>[[getResources?
              &context=`web`
              &parents=`239,259,73`
              &showHidden=`1`
              &tpl=`ArticleCategoryTpl`
              &sortdir=`DESC`
              &sortby=`publishedon`
              &includeContent=`1`
              &includeTVs=`1`
              &processTVs=`1`
              &tvPrefix=``
             &tvFilters=`articlestags==Sonnets` ]] //if an article has multiple tags, this won't work!
            // even if Sonnets is one of them. Perhaps there is a solution
            </ul>

            Secondly, build thy own tag system? If you understand (good luck) the documentation on Tags please educate and enlighten me/us.
            The good thing is, it does the counting for you, prepares the landing page for each category and so forth. Just clean up the URL that's all,
            [[!tagLister? &tv=`articlestags` &target=`34`]]
              TinymceWrapper: Complete back/frontend content solution.
              Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
              5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              All tags are is a TV. There are several ways of fetching the values of a given TV for a given resource, so you can get the IDs of all the resources whose tags you want to work with, then get the values of the tag TV for those resources. Inversely, get the resource IDs for tag TVs whose value is whatever tag you're looking for.
                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
                • 9207 ☆ A M B ☆
                • 2,475 Posts
                I'd like to get a nice MODX Taxonomy Add-On written and released -- to solve this "tag cloud" issue more cleanly, it'd be helpful to have a couple custom database tables to join a page ID with a taxonomy term. Anyone know if someone has written such a plugin yet?
                  • 36924 ☆ A M B ☆
                  • 298 Posts
                  This is a sweet read. Will watching for what follows.