We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30703
    • 51 Posts
    I have a template variable called "categories", and I have links that point to my page with a $_GET parameter of "catId"... a typical link would look like:

    page_name.html?catId=tutorials

    I have a snippet call in the page template that looks like:

    [[!getResourcesTag? &tagKey=`categories` &tagRequestParam=`catId`]]
    


    What am I doing wrong here? I have tried adding "&parents=`0`" to the snippet call too, but no luck.

    Below is this original post which might give you more info.





    I have set up an auto-tag TV which works well, and I have used the TagLister snippet to output a list of these tags. What I’m struggling with now, is how to request ALL pages with a specified tag.

    For example, if you click a link outputted by TagLister called "Tutorials", I want to display a list of all the resources that contain the tag "tutorials". I’m sure this is a simple task but I’m missing the point somewhere.

    Would I need to use getResourcesTag snippet or something?

    [EDIT]

    As extra information... in case anyone thinks I have simply just asked for a solution before attempting to do this myself smiley
    My current set-up (which may or may not be on the right track) consists of:

    - My page that output the tags, and all the tags link to a page that will (hopefully) process the information I need. lets call this page "processChunk" for now.

    - When someone clicks a link, the onClick handler will call the "processChunk" page and pass in a $_GET parameter like so: "processChunk.html?chunk=outputTaggedPages&tagId=tutorials"

    - I have a chunk called "outputTaggedPages" which is the bit I’m struggling with... I need this to say "hey MODx, give me all the resources in the site tree that have a "tag" that contains the value "tutorials".
    I’m struggling to even think how to do this bit :S

      Tom Dyer

      Designer/Animator/Web Developer - England, UK.
      http://www.bespokepixels.co.uk
      • 30703
      • 51 Posts
      Anyone? sad I have been trying to get this working all day - I’ve added the &element and &elementClass parameters to the snippet call to make sure that getResourseTag knows to use the getResources snippet and that still has no effect.

      Does anyone know if I need to pass in any extra information? maybe a parameter to say that it’s a template variable I’m using?

      I’m stumped! sad

        Tom Dyer

        Designer/Animator/Web Developer - England, UK.
        http://www.bespokepixels.co.uk
        • 30703
        • 51 Posts
        ahh crap - I forgot to add the template to use: &tpl=`myTpl`.

        I think I’ll mark this as [SOLVED] and crawl back into the corner to cry! lol embarrassed

          Tom Dyer

          Designer/Animator/Web Developer - England, UK.
          http://www.bespokepixels.co.uk