Announcement

Collapse
No announcement yet.

Stripping HTML out of the breadcrumbs

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

    Stripping HTML out of the breadcrumbs

    I have a storeowner that likes to add styling to some of his category names using span tags with the styling.

    Code:
    <span style="color:#FF0000;">Yada Yada<br>Yada Yada</span>
    For the most part, this can be "fixed" using mvt instead of mvte but the Smart Breadcrumbs is already using it.

    The HTML is showing up title="&mvt:cats:name;"
    Code:
    <span class="u-color-gray-50 u-inline-block" title="&mvt:cats:name;" itemprop="item" aria-current="page">
    <span itemprop="name">&mvt:cats:name;</span>
    </span>
    which blows is apart to something like this

    Code:
    <span class="u-color-gray-50 u-inline-block" title="<span style="color:#FF0000;">Yada Yada<br>Yada Yada </span>" itemprop="item" aria-current="page">
    How can I strip out that HTML?

    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

    #2
    Hi Leslie,

    You might try replacing &mvt:cats:name; with <mvt:eval expr="miva_html_strip(l.settings:cats:name, '')"/>
    Matt Zimmermann

    Miva Web Developer
    Alchemy Web Development
    https://www.alchemywebdev.com
    Site Development - Maintenance - Consultation

    Miva Certified Developer
    Miva Professional Developer

    https://www.dev4web.net | Twitter

    Comment


      #3
      Thanks Matt Zimmermann! That cleaned it up nicely!
      Leslie Kirk
      Miva Certified Developer
      Miva Merchant Specialist since 1997
      Previously of Webs Your Way
      (aka Leslie Nord leslienord)

      Email me: [email protected]
      www.lesliekirk.com

      Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

      Comment

      Working...
      X