We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37015
    • 21 Posts
    Hello

    Okay, I'm trying to work my head around getResources and its syntax.

    I have gotten to the point where I can get it to display a list of child-pages with some information pulled from some template variables - an example of that is here.

    Where the "call" is as follows:

    [[!getResources? &parents=`106` &limit="1000' &includeTVs=`1` &processTVs=`1` &tpl=`softwaretpl`]] 


    and the template is:
    <a href="[[~[[*id]]? &scheme=`full`]][[+alias]].html">[[+pagetitle]]</a> ([[+tv.soft-release]], [[+tv.soft-publisher]])</br>


    This is GREAT and I am quite pleased with myself to get this far without too much help, and only a few moments of "HUH?".

    Now I'm pretty certain getResources is the add-on for the job - but I am not sure how to go about it, and I'm getting a bit confused even thinking about it.

    So here goes - I'm going to try and explain this in simple terms, and maybe you guys could give us a hand? smiley

    With the future of my website in mind, I am going to want a good few pages which will automatically list links to pages that meet specified criteria. I want it to work in the same way a traditional tagging system works (like that on Wordpress or the Category field in Wiki mark-up.).

    For example:
    I would like a page that will show me all software entries that are tagged with "Microsoft". However these pages are not going to be all stored under a single parent ("container").

    I see there is the "Tag" template variable input type - however I can't really work out how to use it. This solution needs to also be suitable to phrases and not just keywords - for example Mozilla Firefox or Internet Explorer.

    Going back to when I used to use Wordpress - you would type a phrase into the tags field, press the delimiter button (in that case a ",") and it would then be saved as a "tag". You could then, if you wanted to, show all blog entries with that tag associated with it.

    Hope that makes sense.

    Thanks
    Dan smiley
      • 40385
      • 75 Posts
      I can think of two possible solutions:


      1. Go with the Articles Component. It will bring the whole blog functionality to MODx Revo including Tagging. It can be found here: http://rtfm.modx.com/display/ADDON/Articles
      2. Stick to the getResources extra and take a closer look at this section of the rtfm (especially the tvFilters property): http://rtfm.modx.com/display/ADDON/getResources#getResources-SelectionProperties
      [ed. note: paul_kemp last edited this post 13 years, 5 months ago.]