Show page id in autonav class
Permalink
Hi, I am working on a custom template for my autonav menu and I need each page ID to be a class for its li element. How can I do this?
I have had a quick google but can't find anything.
Thanks.
I have had a quick google but can't find anything.
Thanks.
This will add the collection ID (page ID) as a class for the li element.
The ternary operator for the classes property is added to remove the extra space if it is false.