We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 52631
    • 15 Posts
    MODX Revolution 2.5.6

    Deduce the contents of the document in the template:

    [[*content]]


    Is it possible to add a filter to exclude images and videos? Filter out everything except the text?

    This question has been answered by BobRay. See the first response.

    • discuss.answer
      • 3749
      • 24,544 Posts
      If you really want plain text, you can try this:

      [[*content:striptags]]


      If you want to retain some tags, you can do something like this to specify the tags you want to keep:


      [[*content:striptags=`<p><div><i><b>`]]



      If that doesn't do it, you can write a custom snippet that does whatever you want. If you call the snippet NoMedia, you can do this:

      [[*content:NoMedia]]

        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting