[TYPO3-templavoila] Good practices: variants of the same HTML layout, what's your opinion?
Ron Hall
ronslists at busynoggin.com
Mon Mar 29 00:30:44 CEST 2010
Hello Marcus
If I understand you correctly, you could do this.
First, write your entire header as one TypoScript object and map that to your templates with outer mapping.
Next write your header like this
lib.header = COA
lib.heade.wrap = <div class="{$myHeaderClass}">|</div>
lib.heade.10 = TEXT
lib.heade.10.value = My Header Stuff
You can then set your header class in section with the constant: myHeaderClass
You will also need to set that constant on the root of your site for a default.
Thanks,
Ron Hall
Busy Noggin, Inc.
a web development agency
www.busynoggin.com
templavoila.busynoggin.com
Twitter: busynoggin (general web tweets)
Twitter: typo3ron (for TYPO3 specific tweets)
On Mar 28, 2010, at 5:15 AM, Marcus 'biesior' Biesioroff wrote:
> ellou' List
>
> I'd like to 'consult' today the way for managing the model with one HTML template and many TO's
>
> Description: I hava a site with sections like General, News, Firm etc... each section has identical layout, but different headers (changed just one class ie: <div class="head_general">, <div class="head_news"> etc.)
>
> I decided to switch it via changing TO for the whole branch in PageTree, so I created 4 TO's and everyone uses its separate template file with proper class name in the header. That's clear I hope.
>
> Now sometimes there are small fixes/changes in HTML files, so I need to edit each file (de facto 4 files in for layouts = 16 HTML files) synchronize it and check every TO for mapping updates.
>
> So, there's question, what is your best practice for such job.
> The fast thing that I can use is one file per layout + select field in DS and changing it via attribute, however I would stay with selecting whole templates, but in the same time without requirement of creating separate HTML files... Can somebody send me an idea? :)
>
> PS. I'm not quite sure if this post is understandable :) It also hasn't high priority, just want to know other point of view, as this one I'm using currently is much far from optimal solution.
>
> Will be grateful for your thoughts.
>
> Greetings.
> --
> Marcus 'biesior' Biesioroff
> a.k.a. Marek Krawczyk (original)
>
> Polish TYPO3 Community
> http://typo3.pl
> _______________________________________________
> TYPO3-project-templavoila mailing list
> TYPO3-project-templavoila at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-templavoila
>
More information about the TYPO3-project-templavoila
mailing list