Announcement

Collapse
No announcement yet.

Sebenza Category Template strip HTML replacement

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • lesliekirk
    replied
    Thanks ya'll

    Leave a comment:


  • alphabet
    replied
    Just saw your screenshot.

    Code:
    <mvt:assign name="g.allowed_tags" value="''" />
    
    <mvt:assign name="l.settings:product:clean_descrip" value="substring_var(miva_html_strip( l.settings:product:descrip, g.allowed_tags ), 0, 200)" />
    
    &mvt:product:clean_descrip;
    It looks like the Sebenza function returned text, otherwise you need the substring_var function to avoid the 403 error

    Leave a comment:


  • Kent Multer
    replied
    Excuse me if I've misunderstood your question, but newer versions of the Miva VM have a built-in function for stripping HTML: http://www.mivascript.com/item/encod...tml_strip.html

    So maybe you'll just need one line of code. :^)

    Leave a comment:


  • alphabet
    replied
    Try the miva_html_strip function

    Code:
    miva_html_strip( text, allowed_tags )
    
    <mvt:assign name="g.return_value" value="miva_html_strip( text, allowed_tags )" />

    Leave a comment:


  • lesliekirk
    replied
    So here's a screenshot of it:

    p0GAVw.png

    Leave a comment:


  • lesliekirk
    replied
    FYI, I get this error message

    Code:
    Error while saving content: %1$s
    
    Error information: " 403 error "

    Leave a comment:


  • Sebenza Category Template strip HTML replacement

    I need to replace snippet I'm pretty sure this is something from the Sebenza Category Template Manager. It would seem that the forum won't let me post the item.

    I checked the Code Samples and it looks like it takes 36 lines of code to replace this one. Please tell me I'm wrong and what it should be instead of all this here

    https://docs.miva.com/code-samples/remove-html

Working...
X