We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 356
    • 31 Posts
    I use MODX for maybe a week, and as far I really love the system and the idea of it. But I see my lack of experience is something that stops me from moving forward in my current project, so I decided to ask the community to help me.

    Well, I’m trying to make game review site, and the structure I need is:

    [tt]\[root]
    \game1
    \news for game1
    \reviews for game1
    \game2
    \news for game2
    \reviews for game2[/tt]

    etc.

    And it is pretty easy to do that structure in MODX. But now I need to create site-wide ’news’ page, which will lists all the news about every game on site altogether, ordered by date. As far I see the only way to do that by doing direct SQL query to the DB, which is not nice solution. The problem is ’news for game#’ sections are under different parent sections and I just don’t know how to make such a global news page using standard components.

    Help me please, I really feel there should be an easy solution for the case!
      • 16183
      • 1,390 Posts
      Hi,

      Welcome to MODx!

      I probably misunderstood your post but have you had a look at the snippet Ditto? It will aggregate you news the way you want how you want. It can pull documents, parent documents to reveal their children etc...So. you could create a page for your site wide news and put your ditto call or calls if you need more than one and it will pull in the documents you specify and order them how you wish.

      I assume you are using modx 0.9.6.3?

      Sorry if this is not what you are after wink

      cheers/k
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Ditto uses a parameter &parents=`2,3,4` so you can specify multiple parent documents from whose children the news items will come from.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 356
          • 31 Posts
          Oh, thank your for your answers, yes I’ve seen ditto and tried to play with but with no results.

          I’m stuck with the fact I don’t know number (and ID’s) of all game ’folders’. I’d like to put some ditto call (or whatever other snipplet) to the template and don’t ever edit its &parents=`...` parameter when we’ll add another game on site. I do believe ditto can check the site structure and list all the pages that are under ’news’ folders under every ’game’ folder (sounds too fuzzy, the structure is much simple). I think I even can modify site’s structure to put all games to \games folder:

          \[root]
            \games\
              \Game1
                \News  <- ditto should show list of all pages in this folder...
                \Reviews
              \Game2
                \News  <- ...and here...
                \Reviews
              \Game3
                \News  <- ...and here
                \Reviews


          I really believe ditto can easily do that, but as far I can’t find a way to ask ditto right way.
            • 9130
            • 171 Posts
            Is there any way for ditto to recognize the news pages? Is there a special template for news pages? Are all of them called ’news’ or use ’news’ as their alias?

            Basically what I’m aiming for is finding a way to use ditto with filtering in order to have a ditto call that goes over the whole document tree and selects only the news documents.
              • 356
              • 31 Posts
              Etal, thank your for the answer!

              Let me render again my aims so maybe I’d better change the site structure and use some "ditto magic" to present the site’s pages to the user:

              1. My site is about games (so, these should be some game’s list in the first place, so visitor will be able to directly choose what he prefer).
              2. The should be number of games, reviews, galleries of screenshots and/or video clips on specific game(s) (that is, I can tag every piecould wur de of information with one or more game title.
              3. When user enter each game’s section he will see submenu like "news | reviews | photos | videos", and, after choose any link from such a submenu, he will see list of such items related to the game he’s under. That is, site path to the list of reviews for game ’Game 1’ should be ’Game 1 > Reviews’, and then user will be able to click on any review title and read the text of it (that is, path will be ’Game 1 > Reviews > Review 17’).
              4. I’d really like to have SEO-aware URLs on site, at least URLs that have no ’?id=12&sid=321’ paths.
              5. And as for site’s administration, it will be pretty good idea to let admin(s) to easily navigate between items. I mean it there can be some like 100 or even more news even for the year, and also some like 30-50 reviews, and photos - it it will be listed under, say, ’News’ subfolder in the admin tree view pane it will be kind of bed usability example, right? May there be some way to change the admin design to fix that?

              Well, I see way to have my site’s items tagged like that ’Game 1, news’, ’Game 2, news’ etc. I see the example here - http://wiki.modxcms.com/index.php/Tagged_blogging_with_Ditto , the only thing I’m afraid of is number of items and now can I then make an individual item page?

              Thank you again for spending time for me, hope I’ll be able to finish my project with MODx since I really love the engine for now!