• TaggingAtoZ, displaying alphabetical grouped tags.#

  • Mark Hamstra - MODX Complete Team Reply #1, 7 months, 1 week ago

    Reply
    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: hello@markhamstra.com


  • vicat07 Reply #2, 4 months, 2 weeks ago

    Reply
    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


  • Mark Hamstra - MODX Complete Team Reply #3, 4 months, 2 weeks ago

    Reply
    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=`` to the link, else it wont pass the tag along
    Also, you'll need to use getResourcesTag (not getResources) in order to use that to filter on tag.


  • vicat07 Reply #4, 4 months, 2 weeks ago

    Reply
    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


  • Mark Hamstra - MODX Complete Team Reply #5, 4 months, 2 weeks ago

    Reply
    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.



  • vicat07 Reply #6, 4 months, 2 weeks ago

    Reply
    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


  • Mark Hamstra - MODX Complete Team Reply #7, 4 months, 2 weeks ago

    Reply
    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/


  • vicat07 Reply #8, 4 months, 1 week ago

    Reply
    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( "category" ["target"]=> string(4 "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:
    -----------
    По категориям (
    Выписка из роддома (2)
    Детский праздник (1)
    День рождения (1)
    Свадьба (3)
    Предложение руки и сердца (1)
    Другое (1)
    История любви (1)
    ----------------------
    Notice the icon � in array(1).

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

    is present


  • vicat07 Reply #9, 4 months, 1 week ago

    Reply
    I am solved it :-)

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

    Thank you Mark, excuse me, I took your attention


  • Mark Hamstra - MODX Complete Team Reply #10, 4 months, 1 week ago

    Reply
    Ah :-) That would explain it, hehe. Your welcome & don't worry. Glad you got it solved!