We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Now (well, in like 10 minutes) released: TaggingAtoZ.

    TaggingAtoZ is a snippet for MODX Revolution (2.1+) that accepts TV names (one or many) as input and parses the different values.

    Values are sorted and split up alphabetically and its output is completely configurable.

    Developed for Vierkante Meter (http://vierkante-meter.nl/)

    Documentation: http://rtfm.modx.com/display/ADDON/TaggingAtoZ
    Bugs & Features: https://github.com/Mark-H/TaggingAtoZ/issues
    Commercial Support: [email protected]
      Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

      Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
      • 36664
      • 17 Posts
      Hi,

      I try to use this snippet and a list of TV's value look like good but i don't understand how can I pass a selected TV's value to the linked resource for filtering. In atozTag tpl i created a link (standart tpl) to the resource with getResource snippet ... I don't understand how can filter list of resources ...

      Best regards,

      Valery
      • Here's the default chunk being used:
        <li><a href="[[~[[+target]]? &tag=`[[+tag]]`]]" class="[[+cls]]">[[+tag]] ([[+count]] results)</a></li>


        You'll have to make sure you pass &tag=`[[+tag]]` to the link, else it wont pass the tag along smiley

        Also, you'll need to use getResourcesTag (not getResources) in order to use that to filter on tag.
          Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

          Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
          • 36664
          • 17 Posts
          Thank you for your replay, Mark

          What's wrong in my setup? I am install tagLister snippet.

          Resource#18
          [[TaggingAtoZ? &tvs=`Category` &target=`[[~124]]`]]
          


          atozTag
          <li><a href="[[~[[+target]]? &tag=`[[+tag]]`]]" class="[[+cls]]">[[+tag]] ([[+count]])</a></li>
          


          Resource #124
          [[!getResourcesTag? &parents=`18` &tagKey=`Category` &tagRequestParam=`tag` &toPlaceholder=`results`]]
          <h1>[[*description]]</h1>
          <p> </p>
          <p> </p>
          [[+results]]
          


          Best regards,
          Valery [ed. note: vicat07 last edited this post 12 years, 3 months ago.]
          • Looks fine to me. What are you seeing and what are you expecting?

            You say you installed the tagLister snippet, but just to be sure, you did install TaggingAtoZ as well right? They're two separate packages, tho TaggingAtoZ borrows heavily from tagLister.

              Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

              Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
              • 36664
              • 17 Posts
              Hi,

              It don't work now, I have empty page with template decoration when I click on a link from a right list of my TV's values:-)

              My be "installed the tagLister snippet" is my mistake. I thought that should be used tagLister.getResourcesTag. I can't find information about stand alone getResourcesTag snippet, TaggingAtoZ.getResourcesTag or getResources.getResourcesTag.

              Valery [ed. note: vicat07 last edited this post 12 years, 3 months ago.]
              • getResourcesTag comes with tagLister, sorry for the confusion.

                If you get an empty page you likely misspelled the TV name and it's not finding any matches..

                You may also want to uncache
                [[+results]]
                as the snippet that sets it (getResourcesTag) is uncached as well. Parsing order: http://www.markhamstra.com/modx-blog/2011/11/nested-caching-in-modx-revolution/
                  Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                  Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.
                  • 36664
                  • 17 Posts
                  Sorry, but I don't understand why it is not working :-(

                  What i have (debug data) Sorry, but TV's values in Russian:
                  array(23) { ["tvs"]=> string(8) "category" ["target"]=> string(48) "projects-partners/projects/projects-by-category/" ["tagKey"]=> string(3) "tag" ["tagSeparator"]=> string(1) " " ["groupSeparator"]=> string(1) " " ["limit"]=> string(2) "20" ["toLower"]=> bool(true) ["encoding"]=> string(5) "UTF-8" ["use_multibyte"]=> bool(true) ["groupNumeric"]=> bool(false) ["numericHeader"]=> string(3) "0-9" ["toPlaceholder"]=> string(0) "" ["groups"]=> array(0) { } ["tplTag"]=> string(7) "atozTag" ["tplGroup"]=> string(9) "atozGroup" ["tplOuter"]=> string(9) "atozOuter" ["cls"]=> string(0) "" ["altCls"]=> string(3) "alt" ["firstCls"]=> string(5) "first" ["lastCls"]=> string(4) "last" ["weights"]=> string(0) "" ["weightCls"]=> string(0) "" ["debug"]=> string(1) "1" } SELECT `modTemplateVarResource`.`id` AS `modTemplateVarResource_id`, `modTemplateVarResource`.`tmplvarid` AS `modTemplateVarResource_tmplvarid`, `modTemplateVarResource`.`contentid` AS `modTemplateVarResource_contentid`, `modTemplateVarResource`.`value` AS `modTemplateVarResource_value` FROM `modx_site_tmplvar_contentvalues` AS `modTemplateVarResource` JOIN `modx_site_tmplvars` `TemplateVar` ON `modTemplateVarResource`.`tmplvarid` = `TemplateVar`.`id` JOIN `modx_site_content` `Resource` ON `modTemplateVarResource`.`contentid` = `Resource`.`id` LEFT JOIN `modx_users` `CreatedBy` ON CreatedBy.id = Resource.createdby LEFT JOIN `modx_users` `PublishedBy` ON PublishedBy.id = Resource.publishedby LEFT JOIN `modx_users` `EditedBy` ON EditedBy.id = Resource.editedby WHERE ( `Resource`.`deleted` = '0' AND `Resource`.`published` = '1' AND `TemplateVar`.`name` = 'category' ) array(1) { ["�"]=> array(7) { ["Выписка из роддома"]=> int(2) ["Детский праздник"]=> int(1) ["День рождения"]=> int(1) ["Свадьба"]=> int(3) ["Предложение руки и сердца"]=> int(1) ["Другое"]=> int(1) ["История любви"]=> int(1) } }

                  list of TV's value:
                  -----------
                  По категориям (8)

                  Выписка из роддома (2)
                  Детский праздник (1)
                  День рождения (1)
                  Свадьба (3)
                  Предложение руки и сердца (1)
                  Другое (1)
                  История любви (1)
                  ----------------------
                  Notice the icon � in array(1).

                  But nothing from page with getResourcesTag.
                  debug=`1`

                  is present [ed. note: vicat07 last edited this post 12 years, 3 months ago.]
                    • 36664
                    • 17 Posts
                    I am solved it smiley

                    By default showHidden parameter is false. All my parent resources is marked as "hidemenu"

                    Thank you Mark, excuse me, I took your attention
                    • Ah smiley That would explain it, hehe. Your welcome & don't worry. Glad you got it solved!
                        Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

                        Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.