Adding css classes to ul (not li) on cmslistmenu

Gerard Y asked on February 4, 2016 12:11

Hi,

I've added a cmslistmenu to my page and wanted to add some css classes to the UL element.

So I added these into the CSS prefix field. Unfortunately these classes are also applied to every li too.

Is there any way to add classes to the ul and not the li?

Cheers, Gerard

*EDIT: Spelling

Correct Answer

Brenden Kehren answered on February 4, 2016 16:31

Nothing odd about it when you can modify the transformation directly with this information. In fact, it would be very limiting if there was a field for this, because it would apply it to all levels vs. a specific one.

As I mentioned, if you use a Hierarchical or Universal Viewer you can define your transformations based on the level you're needing to display and can have specific class info in there.

1 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on February 4, 2016 14:07

Unfortunately, you have to work with the out of the box css classes OR use something like the Hierarchical Viewer or a Repeater in order to create your own menu with specific css classes.

0 votesVote for this answer Mark as a Correct answer

Gerard Y answered on February 4, 2016 14:10

I've changed it to be a repeater. I find it odd they have not included a field for this though!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.