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

    I take it that many of you must have thought about this before, so I hope maybe somone can point me in the right direction here. Basically I’m planning a website for Christian Apologetics with an articles repository, a blog and a forum to discuss anything and everything in this area. The same taxonomy will run through all three sections of the site.

    I need help to think about how to structure my articles/blog posts so they can be easily retrieved both chronologically and thematically. I gather the first requirement is easily solved by the NewsListing snippet, no matter how or where you store your data. But I’m not so sure about the second part.

    I need to be able to assign an article or a blog post to more than one category (where do you do this in MODx?), so a simple folder system won’t be enough. One possibility would be to use the META keywords for this purpose (and make Google happy at the same time). Is this the best way to go? But then again, how do you retrieve articles/blog posts with a certain keyword - preferably through a simple CSS menu? Can the DropMenu snippet in any way be configured to do this? Or can MODx be set up in some other way to achieve the same end?

    Would very much appreciate your input at this point.

    Best regards,

    Mats Wall
      • 32241
      • 1,495 Posts
      Assigning it to multiple categories or parent folder are not supported by MODx out of the box. To achieve this, you can use TV and assign multiple category name separated by || or some other separator keyword that you want, then with newslisting, you can filter it based on this TV. The down side of this, you can’t specify certain set of categories and allow the articles to be assigned to this specific categories only.

      Unfortunately we don’t have category system that can be assigned differently, compare to our folder-document relationship.

      I hope somebody in this forum can help you more in achieving what you’re wanting. Anybody?
        Wendy Novianto
        [font=Verdana]PT DJAMOER Technology Media
        [font=Verdana]Xituz Media
        • 33688
        • 54 Posts
        Steph sent me this in a private message to answer the part about DropMenu snippet and META keywords:

        You can use the modified drop menu to list all pages with the matching keyword or TV. e.g. this should list all subpages of the current folder which have the word "programming" in the META keywords:

        [!DropMenu? &startDoc=`[*id*]` &levelLimit=`1` &here=`current` &selfAsLink=`true` &showDescription=`true` &showAllInMenu=`true` &keywordRegexp=`programming`!]

        You can set up a "keywords" TV instead of using the built in META keywords if you don’t want to limit yourself to the keywords you’ve defined in the "manage resources" admin section. e.g. this should list all subpages of the current folder which have the word "programming" in the "keywords" TV:

        [!DropMenu? &startDoc=`[*id*]` &levelLimit=`1` &here=`current` &selfAsLink=`true` &showDescription=`true` &showAllInMenu=`true` &tvRegexpField=`keywords` &tvRegexpString=`programming`!]

        How to seperate articles and blogs I’m not sure. Perhaps put them in different folders, then you can set the startDoc parameter to the ID of the folder to limit the dropmenu to blogs or articles.

        Hope this helps.
        Looks like a nice solution to me. I post it here so others who need to assign more than one category to an article or a blog post, and then be able to retrieve it through DropMenu, can try it out for themselves.

        Thanks, Steph!

        Mats W.
          • 19986
          • 90 Posts
          Original post here:

          http://modxcms.com/forums/index.php/topic,2588.0.html

          As mentioned in my post, the changes to DropMenu could easily be used to create a section/category setup, where the sections are folders and categories are defined by the value of a template variable.

          Also, bear in mind you’re doing regular expression (regexp) searches, so it’s a LOT more powerful than this.

          Anyway, glad it’s helped.

          Steph
            • 32241
            • 1,495 Posts
            Kewl.

            I miss that post for some reason. Hope we can see this improvement in our 0.9.2 release wink
              Wendy Novianto
              [font=Verdana]PT DJAMOER Technology Media
              [font=Verdana]Xituz Media