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

    I am trying using getResourceField to get the first 200 characters of an article onto the home page of a site and can't see how to limit the character count in some way such as this this:

    [[getResourceField? &id=`26` &field=`bodyCopy1` &characters=`200` &processTV=`1`]]


    Does anyone know if this is possible, or is there a better Extra for this?

    Cheers - Zaphodx
    • There's no such parameter for getResourceField,
      may be you could use some output filters to change the output value.

      Otherwise, if you don't have particular performance needs, you could simply use "getResources" and then some output filter applied in the tpl chunk.
        TilliLab | MODX Ambassador
        website
        • 33379
        • 110 Posts
        Thanks for clarifying that tillilab, it would be a very useful parameter to have I think! I got around the problem a different way, I guess that's the beauty of MODX, there's always more than one way to achieve your goal.

        Cheers - Zaphodx smiley