We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32645
    • 377 Posts
    I would like to strip html tags from "phx:word_limitphx:word_limit" and "phx:character_limit", but without changing the actual functions.

    Is there a way to chain, or combine phx custom modifers... so you could do this;

    // this is an example. Ideally one should strip the html before doing a word limit.
    [+content:word_limit=`10`;content:striphtml+] 
    


    Or can I feed in a variable into my phx function? ie;

    [+content:word_limit=`10` &striphtml=`true`+]
    
      • 36416
      • 589 Posts
      Quote from: worchyld at Dec 23, 2008, 10:32 AM

      Is there a way to chain, or combine phx custom modifers...

      In PHx, output of one modifier is passed to input of another, from left to right:

      [+introtext:htmlent:limitword=`20`+]
        • 32645
        • 377 Posts
        Ah yes! That worked fine. I created a custom modifier and I was able to "chain them" so that it cleaned my output before trimming the length and then displaying it.

        Thanks.

        *Closed*