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

    I don’t really know how to ask, and I even don’t really know how to search for what I’m looking for. Here it is:

    I’m working on a news page. The news articles are aggregated by ditto, all works fine. If the article is "long enough", I can click a link "read more".

    When I click that link, I want the selected article to show at the top of the page and show all the other articles below just like before.

    My question now is how to output the content of the selected news. I could just output the document content. But I have an additional image TV for each article and the pagetitle wich I want to output, too. I could solve this with a second Ditto call wich only shows this exact document and uses an appropriate chunk as a template. But wouldn’t that be overkill? I know the document id and I know the template chunk.

    Is there an easy way (snippet) to fill document content into a template chunk?

    Maybe I’m just blind. Any help very much appreciated smiley
      • 7231
      • 4,205 Posts
      In the article template have a ditto call after the content that will display all the other stories. If you want to remove the current story fromt he list you can use a filter in Ditto to remove the current doc.

      This is a solid solution since you will still have a dedicated page/URL for each story as well as carry the story list over to each page.

      Hope this makes sense.
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 10313
        • 375 Posts
        Okay, if I understand you correctly, you suggest two ditto calls: one for the selected article and one for the others wich will be shown below?