We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12670
    • 8 Posts
    Hey all, I’m in the process of setting up my site in modx, I’m actually switching over from wordpress. I have been thinking of ways to implement complete blog taxonomy i.e. categories and tags. I know you can use ditto and template variables to implement tagging, but I haven’t come across a satisfactory solution for categories yet.

    I know you can create a list or checkbox tv for categories and then create container documents for each category. The problem with this solution is automation, I am not very conversant with the modx api but it seems like it might be possible to create a plugin which inspects the category tv and creates containers with corresponding dittto calls. Another issue would be adding category names as prefixes to post aliases.

    Is it possible to add a paramter to ditto (ie category) which can be passed via urls just like with tags?

    Any thoughts on these or any other solutions?
      • 25663 MODX Staff
      • 12,272 Posts
      Simply make each category a container/folder in the tree heirarchy and have Ditto pull from multiple parents. It’d be simple and automatic. Or do you need a single post in multiple categories?
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 12670
        • 8 Posts
        Quote from: rthrash at May 19, 2009, 01:25 PM

        Simply make each category a container/folder in the tree heirarchy and have Ditto pull from multiple parents. It’d be simple and automatic. Or do you need a single post in multiple categories?
        Yeah I would like to allow for single posts with multiple categories and possibly automate the creation of category folders
          • 20413
          • 2,877 Posts
          I’d suggest save your blog post in one container/folder
          and then categorize using tagging + the REQUEST extender URLs
          http://ditto.modxcms.com/extenders/request.html

          In Snippet call ... &tagMode=`onlyAllTags` &tagData=`categoryTV,regularTagsTv` &tags=`[*categoryTV*]` &extenders=`request` ...

          Then for categorizing links < a href="[~[*id*]~]?ditto_tags&#61;[*categoryTV*],[*regularTagsTv*]">Category - Tag</a>

          This if you set category and tags for a blog posts back-end through TVs

          If you doing blogging front-end you could use &tagData=`description,introtext` which NewsPublisher and NewsEditor snippets can
          update... Test it out.

          //Request with or without furl
          Friendly url [~[*id*]~]?...
          Regular url [~[*id*]~]&

          cool
            @hawproductions | http://mrhaw.com/

            Infograph: MODX Advanced Install in 7 steps:
            http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

            Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
            http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
            • 12670
            • 8 Posts
            thanks @mrhaw I’ll try that