We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11197
    • 16 Posts
    I want to classify pages into categories, have category index pages, and links from pages the category pages.

    This:

    http://wiki.modxcms.com/index.php/Tagged_blogging_with_Ditto

    almost does what I want, but there is one problem.

    This solution requires that the alias of the category pages is the same as the category name. I do not want to do this because I want to keep existing urls (I am moving a site to modx).

    Firstly, has anyone done this already? I did look, but I have not found it. I would rather use an existing solution.

    I have got as far as doing this in the admin interface, by creating a template variable with an input type of checkbox, and option values like this: Category one==cat||Category two==other

    The problem is that I am not sure how to get the names of the categories back from the template variable values (i.e. when the template variable has the valye ’cat’, look it up and get ’Category one’). I should be able to modify tagLinks to do this, but I am not sure what the best way to go about it is. Should I look it up in the database, or is there an API call for this?
      • 11197
      • 16 Posts
      Did it. One short snippet of PHP and I have a working (if somewhat inflexible) category system!

      I think the lesson I learned is that custom solutions are nothing to shy away from on Modx

      ModX is not easiest thing to get started on (more documentation would help a lot), it is obviously really easy and productive one one learns it a little.