We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10405
    • 288 Posts
    I need to set up an easy way for content managers to archive away current news articles on their individual news pages, and replace with new content. They will need a link to the archive page (although this could be set up manually in the content) and basically a one-click way of sending the current news article off to the archive page so they can replace with new content.

    Additionally the archive page should list links to the archived news articles with their titles and descriptions, and each archive link should be sorted by date and also clickable so site users can open up the archive piece if they want to.

    I just need something simple that will perform this task- I know there appear to be some snippets and modules out there that might do this sort of thing, but usually amongst many other functions- I need something that will do the above news archiving as simply as possible and in a way that content managers can easily follow and understand.

    So can anyone recommend some MODx plugins or snippets that will do this?

    For example, I’ve looked into "Ditto" but this seems way too complex for the task (and looking through the documntation there doesn’t seem to be an explanation as to how it can be used for this precise setup), I just want a straightforward system that will do this particular job.


      • 10405
      • 288 Posts
      I guess there’s no way of doing this then?

      If it can be done easily with Ditto, does anyone know how? I’ve tried following the info on the info site- but it doesn’t explain anything about doing what I need it to do with regards editing news, sending it to archives, listing archive pieces etc.

      Please, if anyone knows of any easy way to accomplish this, let me know.
        • 16278
        • 928 Posts
        I think what you want could be achieved fairly simply using a template variable as a flag for archiving, and Ditto with a filter to list and link to only items where the flag is set. It might involve two clicks rather than one, if you can bear that!

        The detail depends on what your editors are doing and what structure they are working in. What are they doing at the moment to update the available content? Do they have only one "live" item at a time? Are their articles linked to from menus? Do they "unpublish" to remove their old material?
        undecided KP
        See http://www.pogwatch.com/ditto.html for examples of how Ditto works
          • 10405
          • 288 Posts
          Hi, thanks for the reply, the way I see it working is editors have four news "teasers" / intro details on the front news page (taken from the first x words of the full article), each of these links to its appropriate full content page with a "Read More" link. In this full content page they should be able to edit the content (obviously) but also "send" the whole content to an archive page (a link back to it should be made in the bottom of the content page), and create brand new content- for the new / repklacement news article whenever that may be.

          Not sure if that can be done at all with Ditto though, and the info about it doesn’t give much away...
            • 10405
            • 288 Posts
            Thanks for the link, which provides much clearer information than the official documentation. Just one question though- there doesn’t seem to be a parameter for specifying the number of words, sentences or paragraphs to display from the "full" article. I’d like to have the Ditto call include maybe the first two sentences from the full article, so that these appear in the resource where the call is made.

            Is there a paramter anywhere for this? If not, is there any other way it can be done?
              • 16278
              • 928 Posts
              The summary extender is your friend in this case:
              http://www.pogwatch.com/ditto/ditto-extenders/ditto-summary.html
              http://ditto.modxcms.com/files/assets/snippets/ditto/extenders/summary-extender-inc-php.html

              I was experimenting with the HTML comment as the split marker the other day - I didn’t get on well with it, as TinyMCE seemed to be "tidying" my comment out of the piece altogether. YMMV.
              cool KP
                • 10405
                • 288 Posts
                Hmm, I’ve tried using the summary extender and it doesn’t seem to display anything more than the article title and an editin note. I’ve tried this:

                [!Ditto? &documents=`180` &extenders=`summary` &truncLen=`200`!]

                But that is only displaying the title (which it’s turning into a hyperlink- which I don’t want)

                Also tried:

                [!Ditto? &documents=`180` &extenders=`summary` &trunc=`0`!]

                Which I thought would output the whole article just as a test, but that didn’t work either...
                ???

                Also I want to make sure this: "by Default admin account on 23-Sep-09 16:31" doesn’t appear at the end...
                  • 15082
                  • 195 Posts
                  You have to make your own Ditto templates in which you can exactly specify what to display and how it looks.
                  See http://www.pogwatch.com/ditto/ditto-templates.html.

                  In the template you also have to use the [+summary+] placeholder to be replaced with the summary extender output.

                  Greetz
                  JUSI
                    • 10405
                    • 288 Posts
                    Ok, think I’m getting somewhere as it truncates ok now when I call the template- the only problem is that after the title, the first thing in the full article is a picture- is it possible to get Ditto to ignore the picture somehow and just proceed to the actual text?
                      • 15082
                      • 195 Posts
                      What about setting up the image as a TV in the articles, using a template for the articles that includes the image and another for the ditto call page that doesn’t?

                      Greetz
                      JUSI