In my modified version(s) of Cuyahoga I have an optional field for CSS class. This class is added to the section div and allows the sections to be styled differently, even with identical content. It means clients don't have to add any extra markup to their sections.
Does this seem like a useful addition?
Simon
Yes, that's a good idea. In fact I'd like to go a step further and add the same to a Node. The class will then be applied to the body tag. When left empty, a class like page-{id} will be added. How does that sound?
I think it is a great idea. It makes use of the markup that is generated and prevents the need to add more unnecessary markup.
I made a post about this here but it did not get a good response :s
http://www.cuyahoga-project.org/home/forum.aspx?g=posts&t=1297
I did propose the use of a module setting (custom settings in admin) that asks for an
optional css class string (defaults to 'section'). This will allow different css class for each section rather than module.
Either way I like this idea still...
I do not think that classes should be added without the user/developers specifically stating so. Nothing added by default. Only by explicitly stating so.
Can I add another recommendation? I have added an image field to the node. This is used as an icon for navigation items.
This is for the creation of large panel navigations (or mega dropdowns as Jacob Nielsen calls them see:
http://www.useit.com/alertbox/mega-dropdown-menus.html).
See navigations:
http://www.actionenvelope.com/
http://www.samsung.com/uk/
An optional node class would be useful here also. Different nav items sometimes require specific layout.
In our menu system we can automatically add a class to each node's li element for sizing, images etc, but this is currently related to the node name. A node class would be much more manageable.
I had a bit of time tonight so I thought about adding this. It took about 15 minutes total.
Change the install sql files
Change object and mappings
Change the admin pages (add extra txt fields)
Change the base module control to write the css class value if it is not empty (still defaults to 'section')
It works a treat. I really should have done it earlier. Now I can set section 'CSSClass' values in the admin.
Because it was so simple I also added an extra field (called 'TitleSEO') to the node . This lets the admin set a string value as the html title. It currently concatenates the Site name and node name. This was a bit limiting to what I needed but took about 10 mins to change. Again, if there is no value provided then it reverts to previous behaviour (so nothing breaks).
I believe these would be good as standard. It enables the developer to think of the sections as part of the site design rather that having to add markup to the inside of the module itself (div and class). It cuts that cord.
One more thing. The way the section moduletools are rendered. I have hid these with a little jQuery so they can be accessed via a small toggle window. When opened the surrounding div is border 1px and highlighed. This way the layout is not affected (elements being moved or offset etc...)
Cuyahoga!