Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 this issue Mar 10, 2022 · 1 comment

Comments

@megoconnor
Copy link

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:

  • the "Class Name" must be a single word (no hyphens)
  • the "College Name" must match the "Class Name"

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
Copy link
Author

Ticket 17002

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant