Page 1 of 1

Unique content blob class or ID for additional CSS flexibility

Posted: Wed Feb 28, 2007 11:58 pm
by JohnnyB
I have a feature request that I believe will be very useful to developers.

The {content} tag could have an optional CSS class parameter under the "Options" tab.
Or the content area populates a CSS class parameter automatically based on the "Page Alias."

I think a class rule would be better than an id because a page can have multiple content areas and an id can not appear twice inside the same html page.

I realize that the body tag int he html ouput has an ID assigned.  But sometimes I get results like, id="pagesitemap", and id="page58"

It would be real cool if after adding the {content} tag into a template, the resulting HTML would look like,

///content here///


Again I realize the body ID can suffice in most cases, but having an unique class for each content area would add greater flexibility and ease of use.

Thanks!

Re: Unique content blob class or ID for additional CSS flexibility

Posted: Thu Mar 01, 2007 5:39 am
by cyberman
mww wrote:
///content here///
Sense of a CMS is dividing content and layout. xHTML and CSS have to go to template. And {content} is only a place holder for content and should not missused as layout.

The easier way is to create a separate template for your sitemap page (with your posted source) and attach this template to sitemap page.

Another option could be a way over smarty where you can make requests for page ID's and so other.

Re: Unique content blob class or ID for additional CSS flexibility

Posted: Sat Mar 03, 2007 2:46 am
by JohnnyB
Another option could be a way over smarty where you can make requests for page ID's and so other.
That would be a good solution.  Much better than having to manage several templates and preserves separation of content and presentation.

Thanks for the good idea!