We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7527
    • 437 Posts
    I have recently been playing around with get pages. So far I have the following call:

    [[!getPage@newsPaging? 
    &elementClass=`modSnippet` 
    &element=`getResources` 
    &showHidden=`1` 
    &tpl=`Blog` 
    &limit=`1` 
    &includeContent=`1` 
    &parents=`9,10` 
    ]]


    with the tpl=`Blog` containing:

    <font face="Verdana" size="7"><a href="[[~[[+id]]]]" rel="bookmark" title="Permanent Link to [[+pagetitle]]">[[+pagetitle]]</a></font>
    <h4>[[+introtext]]</h4>
    <a href="[[~[[+id]]]]" class="more-link">Read the rest of this entry »</a>


    It's almost perfect, the only thing I can't work out is how to return a sample of the content too?
    Anyone have any ideas how I can achieve this, I just want to pull a sample of the content to fill the box
    Regards,
    DS
      www.PawsForWildlife.co.uk
      www.Borntobrick.co.uk
      • 23018
      • 353 Posts
      You've set &includeContent=`1`, so I think [[+content]] should display something. I can't see it in your sample. Did you double check for syntax errors?

      I have noticed you are using font tags in your sample. I haven't seen them for about a decade. May I ask why you are using a html4 doctype?

      Regards,

      pepebe
        Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
        • 7527
        • 437 Posts
        hi pepebe. ive managed to sort it now. im still quite new to coding hence why i have the font tag. what tag would you advise i use instead?
        regards
        DS
          www.PawsForWildlife.co.uk
          www.Borntobrick.co.uk
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Styling should not be done inline. It should be done with external CSS (.css) files.

          http://webdesign.about.com/od/css/a/aa051801a.htm
          http://webdesign.about.com/od/beginningcss/a/aa111000a.htm
            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
            • 7527
            • 437 Posts
            Thank you, I will add it to my css file

            Regards,
            DS
              www.PawsForWildlife.co.uk
              www.Borntobrick.co.uk