We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18453
    • 66 Posts
    How can I apply a template to the decoment that gets displayed when I click the read more link?


    The Ditto call
    [!Ditto? &parents=`1` &depth=`4` &tpl=`newsItemShort`!]


    The template (newsItemShort):
    <div class="newsItemShort">
    <a href="[~[+id+]~]">[+newsItemThumb+]</a>
    <h2>[+title+] [+date+]</h2>
    <p>[+introtext+]</p>
    <p><a href="[~[+id+]~]">Lees meer..</a></p>
    <div class="newsItemBottom"></div>
    </div>

    Thanx in advance!
      • 26931
      • 2,314 Posts
      How can I apply a template to the decoment that gets displayed when I click the read more link?
      this would automatically be the template of the ressources you’re retrieving the data from -> child ressources of ressource with ID 1 in your case
        • 18453
        • 66 Posts
        Thanx for your reply sharkbait!
        Is there a way to asign a template chunk to it?
          • 26931
          • 2,314 Posts
          Is there a way to asign a template chunk to it?
          sorry to ask, but why would you need to do that? smiley
            • 18453
            • 66 Posts
            Because, I rather have the Ditto call select witch template to use.

            For example: you have over 1000 news items and you want to change them to an other template.
            Wouldn’t it be easier to control it with the Ditto call?

            And if I just want to change a few things within the template’s content field and not the whole template, wouldn’t it be better to change only the content part and not the whole global template?
              • 26931
              • 2,314 Posts
              For example: you have over 1000 news items and you want to change them to an other template.
              Wouldn’t it be easier to control it with the Ditto call?
              that’s actually one of the things your Doc Manager Module is build for smiley
                • 18453
                • 66 Posts
                Yeah, you’re right. Thanx for your help anyway! smiley
                  • 18453
                  • 66 Posts
                  There are more reasons why I would like an other way:

                  I have a newspage that displays 10 news items with read more links.
                  When i want to change something in the template that displays the 10 news items, then I will also have to change that same thing within the template that displays the full article..
                    • 26931
                    • 2,314 Posts
                    When i want to change something in the template that displays the 10 news items, then I will also have to change that same thing within the template that displays the full article..
                    no, actually not ...unless of course, i really don’t get your concept smiley
                      • 18453
                      • 66 Posts
                      If I later on decide to add a footer at the end of the page, and I want it to show up on both the page that is displaying the news items and the full article page.. But It doens’t matter, it isn’t a big deal.. thanx for your response anyway