limiting xhtml css tags output
| From: | Vonleigh Simmons | Date: | Sat, 29 May 2004 08:19:19 +0000 |
| Subject: | limiting xhtml css tags output | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-11415@lists.php.net to get a copy of this message | ||
Your thoughts on this matter are very much appreciated. I have a site that is going to reuse the same XHTML but have several different CSS designs associated with it. The project is built using smarty.
In order to reuse the xhtml but have many options in different designs I could do what csszengarden.com does: provide all the tags you could possibly need. I would like to avoid this because I think that misses the point of making it all standards compliant if you have tag soup in the end (not knocking csszengarden, i think it's a great site).
So far I have three approaches:
1. I could make separate templates for each page, but this would miss the point of using templates (and I'd end up with 100s of templates). So this is not an option.
2. I could read the css associated with the page and pass the list of classes and ids to the smarty template, depending on the array smarty would include the tags. Problem with this approach is that the template would be very complicated having "if" statements all over the place for every tag.
3. The third option I considered was having all the tags in the template, but running it through a post filter. The filter would go through the css files, build a list of all classes and ids, and any class or id not belonging to this list would get filtered out of the output.
I'm hoping to get a bit of your collective wisdom on these thoughts or any other idea you might have in order for me to resolve this as best as possible.
Vonleigh Simmons [vanlei]
<www.illusionart.com/pi/>