We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46668
    • 51 Posts
    I am trying to get Tagger working so that the tags show as links and can be clicked on and show a list of all resources with the respective tag.
    I am able to get the tags to show but they dont really filter anything so was hoping someone could post whats needed to make this happen.

    Here's what I have right now.
    [[TaggerGetTags? &showUnused=`1` &rowTpl=`tag_links_tpl`]]

    tag_links_tpl
    <li><a title="[[+tag]]" href="[[+uri]]">[[+tag]]</a></li>

    output of these looks like this
    http://mysite/page-name.html/tags/images/

    Thanks Ian
      • 29661
      • 116 Posts
      Do you have
      [[!getResources? &where=`[[!TaggerGetResourcesWhere]]`]]


      call on your &target URL from TaggerGetTags?
        --
        John
        @theboxer
        • 36549
        • 572 Posts
        Hello,
        @boxer - I wonder if you could expand on how to use Tagger as @panfire wants to?
        I am also trying to have the tags click through to the resources that have those tags but am not getting the desired results.
        I can display the tags OK with a chunk:
        <a href="[[+uri]]">[[+tag]]</a> 

        and the snippet:
         [[!TaggerGetTags? &resources=`[[+id]]`  &rowTpl=`my.article_tags`]]

        But with the above the tag links go nowhere. They simply generate a url of: http://myWebsite.com/myNews/myNewsArticlel/tagCategory/tag/
        I have also tried the following...but this may be way off?
         [[!TaggerGetTags? &resources=`[[+id]]` &rowTpl=`my.article_tags` &target=`[[!getResources? &where=`[[!TaggerGetResourcesWhere]]`]]`]]


        Thanks for any help

        J

          www.9thwave.co.uk
             WEB | DESIGN | PRINT
          • 29661
          • 116 Posts
          You need to call TaggerGetTags with a &target option, where you'll pass an ID of resource where you are going to list resources with specific tag (which will probably be resource myNews from your example URL). With this option the generated URL will be http://myWebsite.com/myNews/tagCategory/tag/

          In this myNews resource you'll need to call getResources with a specific param &where=`[[!TaggerGetResourcesWhere]]`
          so just update getResources call you already have there and add this where.

          [[!getResources? &where=`[[!TaggerGetResourcesWhere]]`]]
            --
            John
            @theboxer
            • 41930
            • 13 Posts
            I am trying to get this to work!
            Clicking on link tag to load resource with summerys of tagged articles
            blogpost template has
            Tags: [[!TaggerGetTags?
                    &resources=`[[+id]]`
                    &rowTpl=`links`
                    &target=`5`
                    ]]

            chunk
            <a title="[[+tag]]" href="[[+uri]]">[[+tag]]</a>


            Resource for summerys in template

            [[!getResources?
                &where=`[[!TaggerGetResourcesWhere]]`
                
            ]]


            Do I need to put this in the content field of resource rather than adding it to a custom template?
            Where do I put the chunk for the summerys?
            as a sidenote, can I use pdoResources instead of getResources?
            • It looks like your target Resource (the one listing the summaries) is ID 5. So your getResources call would be something like this:

              [[!getResources?
                  &where=`[[!TaggerGetResourcesWhere]]`
                  &tpl=`myListingItemTpl`
              ]]
              


              Note the above will have the following default properties to be aware of:

              • &parent=`[[*id]]`
              • &limit=`5`
              • &sortby=`publishedon`
              • &sordtir=`DESC`
              • &showUnpublished=`0`
              • &showHidden=`0`

              So if you don't have any published child resources set to show in menu, under the resource where you call this snippet, nothing will be rendered. As well, in the latest version of getResources you must specify a &tpl chunk or nothing will render. Older versions would give you an array dump.

              Note: your TaggerGetTags call in the blog post template does NOT need to be called uncacheable.

              [[TaggerGetTags?
                      &resources=`[[+id]]`
                      &rowTpl=`links`
                      &target=`5`
                      ]]
              


              Should work fine because the output does not depend on request variables.
                [sepiariver.com] (https://sepiariver.com/)
                • 41930
                • 13 Posts
                Quote from: sepiariver at Dec 10, 2015, 05:31 PM
                It looks like your target Resource (the one listing the summaries) is ID 5. So your getResources call would be something like this:

                [[!getResources?
                    &where=`[[!TaggerGetResourcesWhere]]`
                    &tpl=`myListingItemTpl`
                ]]
                


                Note the above will have the following default properties to be aware of:

                • &parent=`[[*id]]`
                • &limit=`5`
                • &sortby=`publishedon`
                • &sordtir=`DESC`
                • &showUnpublished=`0`
                • &showHidden=`0`

                So if you don't have any published child resources set to show in menu, under the resource where you call this snippet, nothing will be rendered. As well, in the latest version of getResources you must specify a &tpl chunk or nothing will render. Older versions would give you an array dump.

                Note: your TaggerGetTags call in the blog post template does NOT need to be called uncacheable.

                [[TaggerGetTags?
                        &resources=`[[+id]]`
                        &rowTpl=`links`
                        &target=`5`
                        ]]
                


                Should work fine because the output does not depend on request variables.
                  • 41930
                  • 13 Posts
                  Still not working

                  [[TaggerGetTags?
                          &resources=`[[+id]]`
                          &rowTpl=`links`
                          &target=`5`
                          ]]


                  Does not show tags!
                  This is my chunk for listings

                  <div class="post">
                      <h2 class="title"><a href="[[~[[+id]]]]">[[+pagetitle]]</a></h2>
                      <p class="post-info">Posted by [[+createdby:userinfo=`fullname`]]
                   </p>
                      <div class="entry">
                          <p>[[+introtext]]</p>
                      </div>
                      <p class="postmeta">
                        <span class="links">
                  <a href="[[~[[+id]]]]" class="readmore">Read more</a>
                  | <a href="[[~[[+id]]]]#comments" class="comments">
                      Comments ([[!QuipCount? &thread=`blog-post-[[+id]]`]])
                    </a>
                  | <span class="date">[[+publishedon:strtotime:date=`%b %d, %Y`]]</span>
                        </span>
                      </p>
                  </div>


                  I have 2 articles published in child collections.
                  Just want to get this working and then I can explore the other properties.
                  Thanks for helping!!
                  • Add a !

                    thusly:

                    [[!TaggerGetTags?
                    &resources=`[[+id]]`
                    &rowTpl=`links`
                    &target=`5`
                    ]]

                    not sure that will do it just want to rule it out. since YJ said.
                      ________

                      Anne
                      Toad-in-Chief
                      Red Toad Media - Web Design, Louisville KY
                      Hear me tweet: http://www.twitter.com/redtoadmedia
                      "Bring on the imperialistic condiments." - Rory Gilmore
                      • 41930
                      • 13 Posts
                      Tried that, did not work
                      I am working in bitami xampp install on windows 10.
                      If I change id placeholder to [[*id]] tags show up?