Zum Inhalt springen

Page Template Selector (rlmp_tmplselector) und unterschiedliche CSS für den Content

Erstellt am 4. Juli 2006 · Noch keine Antworten

Tags: Templates & Layouts, HTML & CSS, Frage

mediaman ·

Hallo,
ich versuche gerade beim Template Selector für jedes mögliche Content-Area-Template ein eigenes CSS zu definieren. In Modern Template Building 2 steht, dass die CSS-Dateien

<head>
	<title>Wide Main Column, narrow right column.</title>
	
	<!-- Styles ONLY for local use in this template! 
		Should be removed by the Template Auto-parser --> 
	<style>
		BODY { 
			background-image: url(res/testbg.jpg);
			background-repeat: no-repeat;
		}
		DIV#contentsection {
			width: 740px;
			position: absolute;
			top: 120px;
			left: 8px;
		}
	</style>
	
<link href="res/stylesheet.css" rel="stylesheet" />


</head>

, die im Header des Content-Area-Templates definiert werden mit diesem Typoscript

page.headerData.20 < temp.headTemplateCA

auch verwendet werden. Ich habe aber irgendwie den Eindruck, als ob dies nicht passiert. Muss man eine spezielle Syntax im CSS beachten oder wie bekommt man das irgendwie anders gelöst?

Hier noch der Ausschnitt aus Modern Template Building 2

S.8
This stylesheet reference on the other hand defines how the content from our content area template should be rendered.
We want to have this added to the header of the final page!

S.29
# Main TEMPLATE cObject for the HEAD / Content Area
temp.headTemplateCA = TEMPLATE
temp.headTemplateCA {
# Feeding the content from the Auto-parser to the TEMPLATE cObject:
template < temp.contentArea.template
# Select only the content between the <head>-tags
workOnSubpart = DOCUMENT_HEADER
}
...
# Copying the content from Content Area TEMPLATE for <head>-section:
page.headerData.20 < temp.headTemplateCA
This will grab the header from the content area template and include on the page as well. Needed for the stylesheet reference!

Ansonsten funktioniert der Template Selector sehr gut. Ich habe nur vor ct_2 zu kopieren und als ct_4 zu verwenden. In ct_4 möchte ich halt ein extra CSS verwenden, dafür wrappe ich zuvor alle Content-Elemente der rechten Spalte in ein DIV, in der eine CSS-Class definiert ist...

    colRight < styles.content.getRight
    colRight.renderObj.stdWrap.wrap = <div class="bg_col_right"> | </div>