Customizing TOC class #6087
-
My goal: make it so that if an item in TOC has a field Possible solution: custom CSS class added to those entries and the rest will be done with custom CSS. How to go about this: I initially wanted to do a shado wtiddler overriding existing TOC macros to add this functionality, but I noticed this peculiar parameter in the macros: Problem: No matter what I put into that argument nothing changes in CSS classes. I also notice it's not documented. Question 1: Why does nothing change regardless of what I put into that argument? I tried Question 2: Can it actually be used for that or will I have better luck just making a copy of the TOC macro? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Anwert to Q1: After looking up filter examples from SetWidget docs I put I am pretty sure this is the answer, but I'll wait a bit before marking it as THE answer. |
Beta Was this translation helpful? Give feedback.
Anwert to Q1: After looking up filter examples from SetWidget docs I put
[tag[HelloThere]]
as the filter and noticed that all classes changed totoc-item-selected
. Which means that I should've read the documentation ofvalue
andemptyValue
parameters more carefully - I can never expect the toc to have any other class. Which answers Q2, I need to expand the toc macros.I am pretty sure this is the answer, but I'll wait a bit before marking it as THE answer.