Following on from Adding Unique Class Names

This is not exhaustive as I don’t want to spend too much time on it unless you see some mileage in adopting it. I can draw up something in more detail if needed.

But for starters:

###Allow user to add category classes in the category edit popup, like this:

###Dom location 1 - List of Categories

The new class names would be added to the TR element shown below when a list of categories are being displayed. I say TR as opposed to the child TD which is classed as category, because that will enable the row to be selected directly for hiding and so on. As you can see, selecting/targeting the BMW category in dev tools selects the entire category on the page:

###Dom location 2 - Category and Sub-Categories

Similar to the above, although this time viewing a category and sub category.

The parent category class could be added to the body tag alongside the existing category class - see 1. Having the class there follows the existing convention and allows the entire page to be targeted as well as the individual sections themselves. As you can see, I use banners extensively. So for example, being able to assign one class to several categories allows me to assign a banner to this class and control, with ease, where it appears.

As per the parent category example above, the child category classes could be added to the TRs shown in 2. Having classes here as well as the parent class in the body allows me to target everything as a group (body.class) , or differently for each sub category depending on the use case.



###Custom CSS - JS - HTML - restrict by Trust Level

I mentioned the following too. This is part of a bigger requirement which should probably be part of a separate topic. I will put something together when requirements on that have firmed up, or sooner if needed.

1 Like