We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25899
    • 46 Posts
    Hi everyone

    Very new to the world of MODx, and have a question.

    I wish to have the chance to publish news on my site and need help figuring this out.
    I posted an earlier post here http://modxcms.com/forums/index.php/topic,34149.0.html but I can´t seem to find out from this how News publishing really works.

    I want the following to hapen:
    1) On one page a short list of the latest 3 news with a link either on the text or header, to where I can read the entire news
    2) A single page news where it shows the news I just clicked, but in its entire length and perhaps with images
    3) A list of all news to return to, where a pagebrowser is placed either at bottom or top

    Can someone please help me trying to get a grip on this somehow?

    //Carsten - Danish MODx newbie rolleyes
      You don
      • 34193
      • 330 Posts
      Ditto is your answer.

      See http://ditto.modxcms.com/ if you have any problems after that post specific details of problem on here
        • 25899
        • 46 Posts
        Hi Pete

        This is a nice answer, however I still don´t get it?

        I have read about this ditto, but do not have the faintest idea how it works huh

        But based on my background knowledge from other CMS, it is all about setting the news system up, in this case: Ditto.

        But when I want to write some news, how and where are these news saved, in a folder? or on a specific page or in another way?

        Please give me a few hints
        //Carsten
          You don
          • 34193
          • 330 Posts
          ok no problem what I do with my sites is setup a page as my main news page (this holds your ditto call) that would list the last x amounts of news items, then create each news document as sub pages to that page by right clicking on the page within the left tree menu and selecting create page here.

          Then use the ditto call

          [[Ditto?depth=`0` &display=`3`&sortBy=`editedon`&filter=`hidemenu,0`]]

          You can then use a template http://ditto.modxcms.com/tutorials/creating-a-custom-template.html to change how ditto displays the information.
            • 25899
            • 46 Posts
            Ohhh ok, so just to recap here, hope that you are patient person tongue

            I create a page called "News" and on this page I place my ditto call, as stated.
            Then I post all the new news as new pages ?
            So the news can be derived from a folder or anything, but it has to placed one by one on each page?
            Is this understood correctly?

            This would easily generate many pages with my sitetree, if I had for instance 300 news outputs....

            But if this is the standard way to do it, then I will try it.

            //Carsten
              You don
              • 34193
              • 330 Posts
              Quote from: sabumnimdk at Mar 30, 2009, 03:21 PM

              Ohhh ok, so just to recap here, hope that you are patient person tongue

              I create a page called "News" and on this page I place my ditto call, as stated.
              Then I post all the new news as new pages ?

              Yes
              Quote from: sabumnimdk at Mar 30, 2009, 03:21 PM

              So the news can be derived from a folder or anything, but it has to placed one by one on each page?
              Is this understood correctly?

              yes you could even have the news items in a different page and specify &parent="56" where 56 is the doc id of the parent page. this then allows you to pull news items onto any page.

              Quote from: sabumnimdk at Mar 30, 2009, 03:21 PM

              This would easily generate many pages with my sitetree, if I had for instance 300 news outputs....

              But if this is the standard way to do it, then I will try it.

              //Carsten
              yes it could generate many documents but it is not necessarily the standard way the one thing you find with modx is that it is very flexable and there are many ways to do most things.
                • 25899
                • 46 Posts
                Hi again Pete

                Thanks for the swift replies and patient attitude.

                I will try this and hopefully it will turn out nice grin

                Thanks a mill!

                //Carsten
                  You don
                  • 34193
                  • 330 Posts
                  No problem any more issues let post on here the one thing with the modx community is we are always friendly and patient most of us have been there.
                    • 23299
                    • 1,161 Posts
                    What can be confusing is mentally referencing what is a page, a folder, a container and a document with MODx using Ditto.

                    You don’t really create folders. You create a page (can be referred to as a document) and that page can then contain sub pages. The flexibility comes with Ditto, which gives you great many options for presenting, arranging and displaying all your pages.

                    The best way of getting used to this is to create a local test install of MODx on your hard drive and then create a simple Ditto system. You create a container page like "News" and then make sure you click the Container box in the Page Settings panel. Once that container page has been created you can then create sub pages by right clicking that page (News) in the left hand document tree and then click Create Document Here. You then create your Ditto call with the parameters of you choosing in the container page (in this case News.)

                    You can also customize the presentation of your Ditto functions with CSS, but I would get used to creating some sample container pages and sub pages first.

                    The core things to get used to in MODx is how Ditto and Wayfinder work. They work together really. Its very flexible and the presentation options are wonderful. Its good to note that the basic default Ditto and Wayfinder calls are very powerful right out the box.

                    Generally I find it helpful to have a very simple, basic test site going where you can try out all these steps. Once you get the hang of it you can then apply your new techniques to your real projects. You can then add some CSS styling as well. Take a look at www.sottwell.com Susan is a MODx master and her site is a great tool for seeing how things are put together...

                    Max
                      • 25899
                      • 46 Posts
                      Hi both Max and Pete

                      Max, thank you for your input which I will take into consideration.

                      But for the time beeing, I am interested in getting this up and running as I am already building my own template, so this is very critical to me.

                      Pete, I tried following your advises and put it to test on my website, which is also currently my test site for MODx.

                      If you see here http://www.mediegrafikeren.dk/index.php?id=6 you will see that "nyheder" (news in Danish) is my parent page.
                      Is also set as "container"

                      I set the ditto code just like this:
                      [[Ditto?depth=`0` &display=`3`&sortBy=`pagetitle` &filter=`hidemenu,0` &tpl=`myDittoTemplate`]]

                      And set a template which I copied straight up from the link you posted ealier.
                      Then I right clicked my parent page here "nyheder" and chose "Create new document here" and this new document becomes a subpage to my parent page "nyheder"
                      On this new page I create some text and save it and publish it, but nothing seems to happen?

                      Any thoughts ?

                      //Carsten

                        You don