[TYPO3] Sub-Templates?

Ryan Off ryan at ryanoff.com
Sat Jul 22 17:30:23 CEST 2006


Erik,

I like your method and gave it a shot on my site. Super simple.  
Worked great. Here is what I did.

On my original HTML File, shown below, I set the banner using the  
background-image property in my CSS file for the "header" class.  
Thus, as you showed, to change it, I created a new very simple CSS  
file setting the new background-image to my new banner.. Below are  
the files I used/created.

Here is an example of my original HTML File used on all my pages :   
template.html

<html>
   <head>
   </head>
   <body>
    <!--###DOCUMENT### begin -->
    <div class="header">
      <div class="mmenu">###MMENU###</div>
    </div>
    <div class="middle">
      <div class="submenu">###SUBMENU</div>
      <div class="content">###CONTENT</div>
    </div>
    <div class="footer>###FOOTER###</div>
    <!--###DOCUMENT### end -->
   </body>
</html>


-------------
new CSS File with Changed Banner Image : banner-2.css

.header { background-image:url(banner-2.jpg); }

-----
Typoscript in SETUP field of new Extension Template of the page I  
want a new header on

page.includeCSS.file1 = fileadmin/templates/banners/banner-2.css

----

I created an image called banner-2jpg and put it in the same folder  
banner-2.css file..

Super simple. One line in an extension template, one line in a new  
CSS file, putting things in the right place and...

Voilà... it worked perfect!!!

Thanks again Erik..

Amir.. Does this method make sense and work for you?

Ryan


On 22 Jul 2006, at 08:47, Erik Svendsen wrote:

> Hello Amir M.,
>
>> The problem with your suggestion, Erik, is that if I had to change
>> something to the general CSS style, I would have to go through every
>> CSS copy to make the changes.. which may be a hassle - no?  However,
>> other then that concern, this does seem a bit more easy then the  
>> other
>> alternatives.
>>
>
> Not if you do it like I do it. I am using one CSS file who have all  
> the main
> style definition. Everything thats similar on every page. Then I  
> have another
> CSS file who only have those parts who change from page to page.  
> The last
> one is a diiferent css-file for each different design.
>
> On your site that would maybe only be the following part
>
> #banner {
>    background: .......
> }
>
> The rest of the banner definition still in the main css-file.
>
> In the TemplaVoila Adding parts from HTML header, I only include  
> the main
> css-file and the number two css-file who is the correct for the  
> specific
> template. You could even choose to define the second css-file with  
> TypoScript,
> like this:
>
> page.includeCSS.file1 = fileadmin/templates/<yourfolder>/<folder>/ 
> banner-1.css
>
> and make an ext template (TypoScript) on the first page where your  
> new banner
> shoould be with this line
> page.includeCSS.file1 = fileadmin/templates/<yourfolder>/<folder>/ 
> banner-2.css
>
> On www.linnearad.no it's only the bakground image in header and  
> colors who
> are defined in these "number" two CSS-files. So if I want to change  
> the way
> bulleted list looks, it's in only one css-file, even if I have 7  
> different
> TV templates.
>
>
> WBR,
> Erik Svendsen
> www.linnearad.no
>
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english




More information about the TYPO3-english mailing list