We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42954
    • 3 Posts
    Hi There,

    I'm a first time modx'r' and i've hit a stumbling block when amending a clients site. They have a parent page called 'Meet the team' and sub pages for all the team members.

    There is a ditto script on the team listing template that seems to pull in the child pages via a chunk. Below is the Ditto:

    [!Ditto? &depth=`0` &dateSource=`releaseDate` &orderBy=`menuindex ASC` &tpl=`tpl.teamItem`  &noResults=` ` &tagData=`catTags` &tagDelimiter=`,` &tagDisplayDelimiter=`,` ]]


    I've been using http://wiki.modxcms.com/index.php/Ditto_Parameters to try and filter them into departments using the template variable 'catTags' but haven't had any luck so far.

    Any suggestions or help would be great! The site built on ModX 1.0.3 rev 6653.

    Thanks in advance

    Trys

    This question has been answered by kp52. See the first response.

      • 36416
      • 589 Posts
      Quote from: trysmudford at Feb 28, 2013, 08:45 AM

      [!Ditto? &depth=`0` &dateSource=`releaseDate` &orderBy=`menuindex ASC` &tpl=`tpl.teamItem`  &noResults=` ` &tagData=`catTags` &tagDelimiter=`,` &tagDisplayDelimiter=`,` ]]

      I've been using http://wiki.modxcms.com/index.php/Ditto_Parameters to try and filter them into departments using the template variable 'catTags' but haven't had any luck so far.

      What did you exactly *D0* to filter those resources (member pages)?
      How do you show/generate links for department tag cloud?
        • 42954
        • 3 Posts
        Hi there,

        Currently, the ditto pasted above seems to generate the list of all members. I would like to break it down into a few different departments by having multiple dittos that are filtered to only show members in specific departments.

        When trying to setup the filter on the ditto, I did the following:

        [!Ditto? &depth=`0` &dateSource=`releaseDate` &orderBy=`menuindex ASC` &tpl=`tpl.teamItem`  &noResults=` ` &tagData=`catTags` &tagDelimiter=`,` &tagDisplayDelimiter=`,` &filter=`catTags, '253', 2`]]


        I also tried the above but swapped the number 253 for the name of the category.

        The code for showing each member page is:

        <div  id="item[+id+]" class="item col cols1 noLeft">
        	<h2>[[perfectTitle? &docid=`[+id+]` ]] <small>[+description+]</small></h2>
        	<p class="thumb wrap">
        		<a href="mailto:[+email+]" title="make an enquiry">
        			<img src="[+thumbImg+]"/>
        			<span>Send Email</span>
        		</a>      
        	</p>
        	<div class="itemContent">
        		<div class="desc truncate">
        			<p>[+content:trimToSentences+]</p>
        		</div>
        		<div class="toggleLinkWrap"></div>      
        		<dl>
        			<p>
        				<dt>Email: </dt>
        				<dd><a href="mailto:[+email+]" title="make an enquiry"><strong>[+email+]</strong></a></dd>
        			</p>
        			<p>
        				<dt>Office:</dt>
        				<dd class="memberLocation">[+memberLocation+]</dd>
        			</p>       
        			<p>
        				<dt>Areas of practice:</dt>
        				<dd>[+catTags:makeTagLinks+]</dd>
        			</p>      
        
        		</dl>      
        	</div>
        </div>
        [[itemBreak? &every=`3` &unique=`[+id+]` ]]
        


        Hope that makes sense, sorry if it doesn't, I'm pretty new to this MODX stuff.

        Thanks,

        Trys
        • discuss.answer
          • 16278
          • 928 Posts
          If the tags specify the departments you want to list, you can select positively using the &tags parameter, rather than trying to exclude unwanted items with &filter. You can also input the required tags in the URL query string if listing on separate pages.

          Note that you may need to give each Ditto call an &id parameter if there's more than one on a page.

          See Pogwatch for more on tagging.

          :) KP
            • 42954
            • 3 Posts
            Hi KP,

            Thanks so much for the answer! Works perfectly.

            Thanks

            Trys
              • 36416
              • 589 Posts
              Quote from: kp52 at Mar 01, 2013, 09:34 AM
              (...)
              You can also input the required tags in the URL query string if listing on separate pages.

              Yes, and required links could also be generated with something like TagCloud:
              http://modx.com/extras/package/tvtagcloud