We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10076
    • 1,024 Posts
    edit
    so this is probably not possible: What is the [+docTags+] placeholder for? Can i create TV’ d tags an filter those with wayfinder?

    My problem is this, I am building a tri lingual tourist guide site, where we checked 50 Italian villages.
    We checked for categories like: places to eat, nice walks, and nice spots or musea etc. So Idea was to create a page per village per categorie . Then somehow create tags and with a main menu pick eg category "food" and in a sub menu have all the villages displayed that dó have a place to eat and just those villages. Clicking category"walks" should just display all the villages where one can have a nice walk etc.

    Did not find a solution (yet) and I think the docTag placeholder is not what I am looking for?

    Anyone an idea for a solution to this challenge?
      • 4749
      • 623 Posts
      Frank,
      I’m not sure about wayfinder and it’s sorting capabilities, but Ditto is extremely powerful and can sort in very many ways. Will there be overlap in your categories? I’ve recently built a site where I used ditto to construct menus for different categories where the menu items could belong to more than one category if it was tagged that way. Here’s what I did:

      1. Created a TV called [*itemTags*] gave it an input type of Check Box (tag1||tag2||tag3||tag4||tag5) with the Delimited List widget and delimiter "," this way I can select multiple tags and the item can be associated with those tags.

      2. Created my Ditto call: [!Ditto? &parents=`10` &tpl=`itemTpl` &tagData=`tvitemTags` &tagDelimiter=`,` &tagMode=`onlyTags` &tags=`[*menutitle*]` &display=`10` &paginate=`1` &paginateAlwaysShowLinks=`1` !]

      3. Placed my Ditto call in a chunk so I could place the chunk anywhere I wanted and edit in one place. So, the sorting is done by the &tags parameter and if I put the TV [*menutitle*] in there it will be page specific. Ditto is pretty slick.

      You might also want to read this too: Tagged Blogging It’s not an exact fit, but it’ll give you a basic idea of what the possibilities are.
        The MODx has you...
        Utah Web Design
        • 10076
        • 1,024 Posts
        Hi cbaone,

        So if I get that right, the itemtags tv is called in the snippet like this: &tagData=`tvitemTags`
        The &tpl=`itemTpl` defines the output, can that be any list I want? &tagDelimiter=`,` lets me specify the overlaying items in the &tags=`[*menutitle*]` are seperated, here with a comma? (Like so: &tags=`[*tag1,tag2,tag3*]` ).

        Been playing around with ditto a bit I but only used it for say news items and stuff. So the output in the form of a box with a header and a summary and the "read more".

        Now, however, I would like a verical navigation/menu. With overlapping categories. Hope that will work it will save me a lot of extra pages, thanks. WIll give it a go right now

        Frank.
          • 4749
          • 623 Posts
          So if I get that right, the itemtags tv is called in the snippet like this: &tagData=`tvitemTags`
          Correct. But, remember you have to set this tv up correctly. When you create the tv make sure you give it the Check Box input, the values need to be separated by the double pipes "||" and use the Delimited List widget so ditto knows how to separate the tags for sorting.

          The &tpl=`itemTpl` defines the output, can that be any list I want? &tagDelimiter=`,` lets me specify the overlaying items in the &tags=`[*menutitle*]` are seperated, here with a comma? (Like so: &tags=`[*tag1,tag2,tag3*]` ).
          Yes and no. &tpl defines the output so your itemTpl would be something like: <li><a  href="[~[+id+]~]">[+whatever+]</a></li>, BUT the &tagDelimiter just tells ditto how those tv choices are separated and sorted it doesn’t allow you to put multiple tv’s in the call. The &tags parameter just tells ditto to aggregate all the links that were tagged with that parameter. I had mine set up a little bit different that yours so, your ditto call would be like this: [!Ditto? &parents=`10` &tpl=`itemTpl` &tagData=`tvitemTags` &tagDelimiter=`,` &tagMode=`onlyTags` &tags=`walks`  !]

          Your parent folder would contain all the villages and the directory page would have multiple ditto calls to create the lists, like so:

          +Villages (id=10)
          --village 1  (tagged with: walks, museum, food)
          --village 2  (tagged with: walks, food)
          --village 3  (tagged with: food)
          --village 4  (tagged with: walks, museum)
          --
          --
          --
          --village 50

          -Directory
          On the directory page you’d have a ditto call for each category tag:
          <h2>Walks</h2>
          <ul>
          [!Ditto? &parents=`10` &tpl=`itemTpl` &tagData=`tvitemTags` &tagDelimiter=`,` &tagMode=`onlyTags` &tags=`walks`  !] 
          </ul>
          <h2>Walks</h2>
          <ul>
          [!Ditto? &parents=`10` &tpl=`itemTpl` &tagData=`tvitemTags` &tagDelimiter=`,` &tagMode=`onlyTags` &tags=`food`  !] 
          </ul>
          <h2>Walks</h2>
          <ul>
          [!Ditto? &parents=`10` &tpl=`itemTpl` &tagData=`tvitemTags` &tagDelimiter=`,` &tagMode=`onlyTags` &tags=`museum`  !] 
          </ul>
          


          I hope this makes sense. Villages 1, 2, and 4 would all show up in the "Walks" category.

            The MODx has you...
            Utah Web Design
            • 10076
            • 1,024 Posts
            It does make sence, sounds great, thank a lot. Will keep you posted.

            Frank
              • 10076
              • 1,024 Posts
              Solved

              The Ditto did go well but I tried another solution to http://modxcms.com/forums/index.php/topic,22905.15.html and this does let me tag docs and build a menu with Wayfinder! It means I can build a proper navigation, cause I did not figure out how to style the Ditto output like one can do with Wayfinder.

              Thanks all.
                • 4749
                • 623 Posts
                Great news Frank! That’s very good to know. Like I said, my set up was just a tiny bit different than yours. My needs weren’t for navigation, it was more a collection of data with links. I’ll have to go over the solution in detail to learn it for myself.
                  The MODx has you...
                  Utah Web Design