We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38462
    • 39 Posts
    I have Tagger working perfect with getResources.

    However, I am trying to work out how to display the [[+tag]] selected as part of the [[+pagetitle]] within the target page. So that it displays "Resources tagged [[+tag]]".

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

      • 38462
      • 39 Posts
      My Tagger call is:
      [[TaggerGetTags? &showUnused=`1` &rowTpl=`Tag_Chunk` &target=`[[*parent]]`]]

      creating a tag cloud of all tags available that will link to the parent resource and filter my getResources call.

      Tag_Chunk
      <li><a href="[[+uri]]">[[+tag]]</a> ([[+cnt]])</li>


      GetResources call:
      [[getResources? &parents=`[[*id]]` &where=`[[TaggerGetResourcesWhere]]` &showHidden=`1` &tplWrapper="Article_list_chunk" &tpl=`Article_chunk`]]


      Ideally, I would like to embed the [[+tag]] in the getResource tplWrapper.
      • discuss.answer
        • 29661
        • 116 Posts
        Hello,

        I would suggest using http://modx.com/extras/package/geturlparam, where you can fetch the tag from URL. Tags will be in $_GET['group-alias'] variable.

        Just note, that you can have more tags in URL and also more groups.
        /list/group-1/tag-1/tag-2/group-2/tag-3/tag-4 is allowed smiley

        John
          --
          John
          @theboxer
          • 38462
          • 39 Posts
          Hi John,

          Thanks for you help, this worked perfect for me, used the following:
          [[!getReqParam? &type=`GET` &name=`tags`]]


          Tags being the name of the group the tag is located.

          BTW, fantastic extra!