November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi yes you are missing the fact that the CssClass is not set on the html that is rendered by the DisplayTemplates builtin for linkitemcollection. A lot of these parameters that can be set on the html.propertyfor helper is there for editmode sadly. Have a look at these links written by Joel Abrahamsson.
http://joelabrahamsson.com/how-episervers-html-helper-propertyfor-works/
CustomTag changes the type of element that wrapes the rendered property when rendered in edit mode.
CssClass does not change the CSS class for the wrapping element when rendered in edit mode. EditContainerClass does.
In view mode PropertyFor isn't much more than an alias for DisplayFor. In edit mode it adds a wrapping element to whatever is rendered by DisplayFor. The wrapping element contains attributes that the CMS uses to identify editable properties.
My recommendation is to use your own displaytemplates that you can use with propertyfor. Just create a new LinkItemCollection.cshtml in DisplayTemplates-folder. /Views/Shared/DisplayTemplates/. Then you can change the output just the way you like it.
The following code does not appear to be working correctly. Any ideas?
Renders the following
I am trying to get the class 'terms' to be applied on the
element.
Based on some other posts, I have also tried:
Any ideas? Am I missing something blatanly stupid here?