XML Block with a xslt Format not seeing/applying my CSS Class

aoray's Avatar


05 Nov, 2014 02:46 PM

I done this before. At the time we were at 7.4 I believe. We are at 7.8 now, some changes may have occurred. I created a xml block and I created a xslt format in the output. The format is pulling the data but it is not applying the css. I put the same html code in a xhtml block and it works pretty. I am trying to use a xml file to manage my external site urls, used through out the site.

xml block and format - screen shot (menu links are off not applying the css)
see file xml-block.png

xhtml block - screen shot (menu is pretty)
see file xhtml-block.png




<?xml version="1.0"?>
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:template match="LINK">
        <!-- main nav -->
        <nav aria-label="Main Navigation" class="main-nav" id="main-nav" role="navigation">
            <a class="switcher" href="#">Menu
                <i class="fa fa-bars"/>
                    <a href="{BOOKSTORE}" onClick="ga('send', 'event', 'MAIN-NAVIGATION', 'click', 'MERCHANDISE');">MERCHANDISE
                        <i class="fa fa-shopping-cart"/>
                    <a href="/125/history" onClick="ga('send', 'event', 'MAIN-NAVIGATION', 'click', 'HISTORY');">HISTORY
                        <i class="fa fa-clock-o"/>
                    <a href="/125/events" onClick="ga('send', 'event', 'MAIN-NAVIGATION', 'click', 'EVENTS');">EVENTS
                        <i class="fa fa-calendar"/>
                    <a href="/125/publication" onClick="ga('send', 'event', 'MAIN-NAVIGATION', 'click', 'PUBLICATIONS');">PUBLICATIONS
                        <i class="fa fa-book"/>
                    <a href="/125/gallery" onClick="ga('send', 'event', 'MAIN-NAVIGATION', 'click', 'GALLERY');">GALLERY
                        <i class="fa fa-share-alt-square"/>
                    <a href="site://NCAT.edu/giving/give-now" onClick="ga('send', 'event', 'MAIN-NAVIGATION', 'click', 'GIVE-NOW');">GIVE NOW 
                        <i class="fa fa-gift"/>
                    <a href="/125/map" onClick="ga('send', 'event', 'MAIN-NAVIGATION', 'click', 'CAMPUS-MAP');">CAMPUS MAP
                        <i class="fa fa-map-marker"/>
        <!--/ main nav -->
  1. aoray closed this discussion on 07 Nov, 2014 08:18 PM.

  2. aoray re-opened this discussion on 07 Nov, 2014 08:20 PM

  3. 1 Posted by aoray on 07 Nov, 2014 08:20 PM

    aoray's Avatar

    I figured out why the CSS was not being applied correctly. Cascade is writing my code in the format. Instead of it staying <i class="fa fa-map-marker"></i> , Cascade is rewriting it as <i class="fa fa-map-marker"/> thus causing the issue.

  4. aoray closed this discussion on 07 Nov, 2014 08:21 PM.

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac


26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM