Re: [SMARTY] limiting xhtml css tags output

From: Date: Sun, 30 May 2004 03:40:45 +0000
Subject: Re: [SMARTY] limiting xhtml css tags output
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11419@lists.php.net to get a copy of this message
Vonleigh Simmons wrote:
BTW, thank you both Joachem and Sarah for taking the time to think of this and responding.
cheers.
What about having all your css tags and ids be named exactly the same but output differently depending on which stylesheet you include?
    There would be lots of different tags, some named the same, some named depending on the page they're located on, etc.  For example:
    Let's say you have a gallery page, a person might have more than one gallery. So I have to include css tags specific to galleries in general (which would be the same for everyone, e.g. galleryimages, gallerytitle, etc.). However, someone might like to have a different look to each one of their gallery pages, so now I have to include a tag that's specific to their page, e.g. id=$pagename . "title". This would accomodate a design like this one, where he has a different left image depending on which gallery you're in:
in this case give each gallery (I assume its got data coming out of DB or something) a stylesheet attribute and then include this (if set) instead of the client/owners default 'gallery' stylesheet. you will have to define a new style sheet for every different design but the tags still don't need to change (you still may need a mechanism to add some custom HTML depending on the stylesheet/design that is selected to accomdate special visual crap.)
<http://www.joshsong.com/>
    Then there would be overlap, for example you can have the images of a gallery floating, so as many images as can fit, do fit. However, someone might want to make it in groups of four, so I'd have a tag "groupFourImages". This would accomodate a design like this one:
the end of your mail states 'go look at csszengarden' (I have read it backwards, many times.) and I would politely say 'right back at ya' - don't change the tag classname or id - change the style definition (by switching the included stylesheet is a good way ;-)
<http://arthost.org/images/sketches/waterpaper-2.jpg>
and depending which stylesheet you include, cellClass has a totally different defininition.
    Yes, that's exactly the idea. So it has a completely different design depending on what css is included. Read my original post, or better yet, take a look at:
<http://www.csszengarden.com/>
    It's the same XHTML page, with the same tags, however every CSS page interprets the tags differently and builds a completely different page. However, in order to achieve that, if you look at the code, there's tons and tons of extra tags to accomodate every possible design. For example: border1, border2, etc. As someone might want a decorative border, someone might want two; but if you don't want one you have all these extra tags.
I think, Vonleigh, you have contradicted yourself. (its late/early for me - so I might be reading funny.)
Vonleigh Simmons [vanlei] <www.illusionart.com/pi/>


« previous php.smarty.general (#11419) next »