We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25322
    • 78 Posts
    Really stuck here.  I  very new to modx and cms’s but have pretty much converted by xhtml/css site over to modx without any major problems.  What i want to do is probably really simple..  On the home page of the site under my heading and welcomenote and all that i want to have a news and updates section like this one on  http://corkd.com/      it will say like posted 2 days ago instead of the date and will have a link to older news and rss at bottom..

    can somebody just help me get started on what i need to do. do i start by a page with just the news on it and then somehow have say the first three news stories sent to my homepage from here. Is this how it works???



    I would be really grateful if someone could help
      • 16885
      • 255 Posts
      First of all I’d like to suggest you to take a look at the demo data that comes with a default MODx installation, might be useful to you. After that, you might find the MODx Wiki on Ditto article interesting, I believe what you want to do can be done with templates without too much trouble, not sure if the ’x days ago’ is possible by default, but that shouldn’t be too handle elsewise.
        • 25322
        • 78 Posts
        when i installed modx i didn’t install any templates that came with it.. Can i download this default template anywhere to have a look at it?
          • 25322
          • 78 Posts
          Hi
          I have looked at the wiki documentation on ditto. Its understand what ditto does but its how i put everything together thats the trouble.
          Is one way to do it this:
          Create my news page. Say i have 10 news articles. Put each news article inside their own tv. put each tv onto this page.
          Then put ditto inside the div on my homepage where i want it to give me the 5 latest news articles from this news page

          cheers

            • 16885
            • 255 Posts
            There is absolutely no reason to put content in a TV; just put it on a page and let Ditto output the latest x or y articles on a page of your wishes.(This is why I recommended the demo content, also has this kind of stuff)
              • 1261
              • 27 Posts
              I <i>n</i>th doing a local install of MODx with the sample content (I used MAMP on my powerbook; google around for a pre-built *AMP stack for your OS of choice). Looking at how things are done in the templates has been incredibly useful to me.

              I could attempt to describe at length how to set this up, but I haven’t yet gone through creating a document for adding news entries on the web (so far I’m adding entries through the manager) so I’d be missing a few crucial steps that you’d want. However, if you dissect the sample dataset in combination with the Ditto documentation you should be able to work out how it works.

              In short, for the display end: First, create a new Chunk. This’ll be the template that determines how Ditto displays your news items. Use Ditto-specific placeholders (the list is at http://wiki.modxcms.com/index.php/Ditto_Placeholders) to tell Ditto where to put the relevent items.

              Next, create your news documents. You’ll want one new document to serve as the "folder" / "base" here (I’m not sure what the official MODx term is, but its the document ID you’ll point Ditto to, and its children will be the documents Ditto displays). I don’t know about creating a web frontend to add new news yet, but for now you can add a couple of new documents as children of your base.

              Now, on your frontpage, insert a [!ditto!] placeholder. Use the parameters from http://modxcms.com/ditto_parameters.html. The most important ones are &startID, which you should set equal to the ID of your "base" folder, and &tpl, which should be the name of the chunk you created to serve as a template.

              Sorry this is so cursory, but hopefully it’ll get you looking in the right direction. smiley
                • 25322
                • 78 Posts
                cheers alterscape. that does explain things quite a bit actually. Thanks