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

    I’m just about getting my head around Modx and up to now love it but am having some issues while playing around with the Andreas00 template... (http://modxcms.com/forums/index.php/topic,3886.0.html)
    .
    I’ve pretty much got the template all working but i can’t figure out how to get get content to display in the news section in the left hand column.
    The template code is as follows:
    <div class="announce">
    <h2>Latest news:</h2>
    
    [[NewsListing? &startID=`100` &summarize=`2` &total=`20` &commentschunk=`FormBlogComments` &tpl=`nl_sidebar` &showarch=`0` &truncLen=`100` &truncSplit=`0` &truncText=`Read more »`]]
    
    </div><!--//announce-->


    I thought maybe it had something to do with the startID for the page so i created a page with a menu item of 100 and altered the NewsListing? &startID accordingly....but it doesn’t work.

    Could anyone tell me what i am overlooking here?

    Thanks for any help.

    J
      www.9thwave.co.uk
         WEB | DESIGN | PRINT
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      That’s an old template. NewsListing has long been deprecated in favor of Ditto. So change the snippet call to a Ditto call; the documentation for Ditto is quite extensive, as Ditto is extremely powerful and flexible.

      http://ditto.modxcms.com/
        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
        • 36549
        • 572 Posts
        Thanks for the quick reply.

        Crikey, i’ve looked at the Ditto tutorials before and they seem to be so convoluted that it’s off putting to learn.
        I’m presuming they are the only tutorials available as i’ve scoured Google a number of times.
        Those tutorials don’t seem to follow any steps to a final scenario...there doesn’t appear to be any structure to it so when i’ve looked at building a news section (standard sort of thing with news title and a couple of lines of text on the home page with links to further reading), it’s impossible to fathom.

        Do you know of anywhere that has a step by step tutorial?

        Thanks
          www.9thwave.co.uk
             WEB | DESIGN | PRINT
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Basically, just make a Ditto call:
          [[Ditto? &parents=`xx`]]
          where xx is the ID of the container of your news pages. Then take things one step at a time from there; for example creating a custom display template.

          It is a bit overwhelming at first, but it goes easier if you just decide what you want to customize from a default call.
            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
            • 36549
            • 572 Posts
            Ok, thanks for the info.

            So would i add the call to ditto from the actual page or the template page?

            On the Andreas template the call to the news listing is in the template but on this thread (http://modxcms.com/forums/index.php/topic,20052.0.html) it seems to suggest that the call is from a document.

            I actually have the news displaying so i’m getting somewhere:-)
            I have placed this code in the main template:
            [[Ditto? &startID=`5` &summarize=`2` &removeChunk=`Comments` &tpl=`nl_sidebar` &paginate=`1` &extenders=`summary,dateFilter` &paginateAlwaysShowLinks=`1` &tagData=`id`]]

            Just a few more questions if anyone has the time to answer....
            Can i make the headlines clickable to further reading?
            Should the main ’news’ container document click through to a page that links to all the sub news pages?
            Can i limit the number of news items on the home page?

            Thanks for any help.

            J

              www.9thwave.co.uk
                 WEB | DESIGN | PRINT
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              You can do all of those things. Most of it, like a linkable headline, can be done in a custom template.

              Again, even though the documentation seems overwhelming at first, you really do need to work through it a few times to really understand the full power of Ditto.
                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