hannonhill / exchange-resources

New repo for cleaned up Exchange Sites for Cascade CMS.
https://www.hannonhill.com/resources/exchange/index.html
6 stars 11 forks source link

Course Catalog - homepage badge border colors specified in color-mapping Block fail to appear if Class Name is more than one word or doesn't match College Name #9

Open megoconnor opened 2 years ago

megoconnor commented 2 years ago

Description

In the ADDITIONAL CSS region of the homepage, the "/_resources/color mapping" Block is combined with the "/_cms/formats/velocity/color-mapping" Format to generate an inline style tag. That Format uses the "Class Name" field in the Block to generate the CSS classes and their colors.

However, in the DEFAULT region, the "/_cms/formats/velocity/catalog/catalog-landing" Format which is responsible for outputting the badges and their class attribute values, does NOT use the "Class Name" field from the "color-mapping" Block and instead just uses the "College Name" for both the badge label and class attribute value.

Because of this:

Workaround

For multi-word college names, you can build in special cases in the "catalog-landing" Format so that the class attribute value matches the "Class Name" in the style tag:

#if ( $class == "Liberal Arts" )
    #set ( $class = "Liberal" )
#end
megoconnor commented 2 years ago

Ticket 17002