Antwort
 
LinkBack Themen-Optionen Thema durchsuchen Thema bewerten Ansicht
  #1  
Alt 14.01.08, 13:48
Forum Aktivist
 
Registriert seit: 19.09.07
Alter: 20
Beiträge: 58
Gelöst - Template für Subpage

Hallo zusammen.

Ich habe im Root Template per TS ein Header Bild definiert, dass auf jeder Seite erscheint:

Typoscript-Code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
#...

## Header Bild ##
temp.headerBild = IMAGE
temp.headerBild {
file = fileadmin/template/main/template_images/headerBild.jpg
altText = Header Bild
titleText = Header Bild
wrap = <h2> | </h2>
}

#...

# Main TEMPLATE cObject for the BODY
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
    # Feeding the content from the Auto-parser to the TEMPLATE cObject:
template =< plugin.tx_automaketemplate_pi1
    # Select only the content between the <body>-tags
workOnSubpart = DOCUMENT_BODY

subparts.headerBild < temp.headerBild

subparts.menu < temp.menu
subparts.content < styles.content.get
}

#...
Nun möchte ich das auf einer Seite (inkl. ihrer Unterseiten) ein anderes Header Bild erscheint.
Dazu habe ich auf der entsprechender Seite ein neues Template erstellt, in welchem ich folgenden TS platzierte:

Typoscript-Code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
## Header Bild 2 ##
temp.headerBild2 = IMAGE
temp.headerBild2 {
file = fileadmin/template/main/template_images/headerBild2.jpg
altText = Header Bild 2
titleText = Header Bild 2
wrap = <h2> | </h2>
}

temp.headerBild < temp.headerBild2
Ich wollte damit eigentlich das Header Bild überschreiben, aber es ignoriert dies irgendwie.

Gibt es da eine andere Möglichkeit?
Oder wie kann ich ein Objekt von einem anderen Template aus überschreiben?

Gruss,
Arno

Geändert von Arno (15.01.08 um 08:55 Uhr).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
Sponsored Links
  #2  
Alt 14.01.08, 20:45
Forum Freak
 
Registriert seit: 26.01.07
Beiträge: 523

Hast du mal versucht den Marker mit dem neuen Bild zu überschreibe?
Typoscript-Code:
1:
subparts.headerBild < temp.headerBild2
__________________
mfg
Günni
City-Tiger - Online durch die Straßen tigern
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #3  
Alt 14.01.08, 21:42
Forum Stammgast
 
Registriert seit: 08.08.07
Ort: Minden, Bochum, Wien
Alter: 1
Beiträge: 168

Du könntest auf uterschidliche Templates zugreifen. Hier mal mit ner schicken Auswahl:
HTML-Code:
page.10 = TEMPLATE
  page.10.template = FILE
 [globalVar=TSFE:page|layout=0]
 page.10.template.file = fileadmin/template/kt-org/css-layout.html
 page.includeCSS.file1 = fileadmin/template/kt-org/css/import_2_col.css  
page.includeCSS.file2 = fileadmin/template/kt-org/css/iehack_2_col.css 
 [global]  
 [globalVar=TSFE:page|layout=1] 
page.10.template.file = fileadmin/template/kt-org/css-layout.html 
page.includeCSS.file1 = fileadmin/template/kt-org/css/import_3_col.css 
page.includeCSS.file2 = fileadmin/template/kt-org/css/iehack_3_col.css   
[global]
Und das kommt in die TSConfig der Root-Page:

HTML-Code:
#-----------------------------------------------------#
 TCEForms anpassen für Layoutwahl 
TCEFORM.pages.layout.altLabels.0 = 2-Spalten
TCEFORM.pages.layout.altLabels.1 = 3-Spalten
TCEFORM.pages.layout.removeItems = 2,3,4,5,6 
#------------------------------------------------------
</OL>Statt der Spalten definierst du einfach unteschiedliche Bilder.

LG Cyprus
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #4  
Alt 15.01.08, 08:51
Forum Aktivist
 
Registriert seit: 19.09.07
Alter: 20
Beiträge: 58

@Cyprus, danke für deinen Vorschlag, konnte das Problem allerdings anders lösen (meiner Meinung nach unkomplizierter ).

@gbauer81, danke auch dir, deinen Vorschlag hatte ich auch schon ausprobiert, doch er musste noch ein bisschen erweitert werden, damit es funktioniert:


Hier mein Template Setup der geänderten Subpage:
Typoscript-Code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
## Configuring the Auto-Parser for main template ##
plugin.tx_automaketemplate_pi1 {
    # Read the template file:
content = FILE
content.file = fileadmin/template/main/index.html

    # Here we define which elements in the HTML that
    # should be wrapped in subpart-comments:
elements {
BODY.all = 1
BODY.all.subpartMarker = DOCUMENT_BODY

HEAD.all = 1
HEAD.all.subpartMarker = DOCUMENT_HEADER
HEAD.rmTagSections = title
DIV.all = 1
TD.all = 1
}
}

## Header Bild 2 ##
temp.headerBild = IMAGE
temp.headerBild {
file = fileadmin/template/main/template_images/headerBild2.jpg
altText = Header Bild 2
titleText = Header Bild 2
wrap = <h2> | </h2>
}


############ Templates ############

# Main TEMPLATE cObject for the BODY
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
    # Feeding the content from the Auto-parser to the TEMPLATE cObject:
template =< plugin.tx_automaketemplate_pi1
    # Select only the content between the <body>-tags
workOnSubpart = DOCUMENT_BODY

    # Substitute the ###header### subpart with some example content:
subparts.headerBild < temp.headerBild
}


############ PAGES ############

## Default PAGE ##
page = PAGE
page.typeNum = 0

# Copying the content from TEMPLATE for <body>-section:
page.10 < temp.mainTemplate
Gruss, Arno
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
  #5  
Alt 15.01.08, 11:27
Forum Stammgast
 
Registriert seit: 08.08.07
Ort: Minden, Bochum, Wien
Alter: 1
Beiträge: 168

Danke an Arno das du deine Lösung auch gepostet hast. Ich denke alle hier dargestellten Lösungen sind je nach einsatzfall sinnvoll.

Vielleicht solltest du den Thread auf "gelöst" stellen.

Lieben Gruß

Cyprus
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
Mit Zitat antworten
Antwort


Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht Thema bewerten
Thema bewerten:

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge anzufügen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

vB Code ist An.
Smileys sind An.
[IMG] Code ist An.
HTML-Code ist Aus.
Trackbacks are An
Pingbacks are An
Refbacks are An


Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Problem mit Shortcut-Typ "First subpage" bei Mehrsprachigkeit at.net TYPO3 4.x Fragen und Probleme 0 16.07.08 14:56
Seite basierend auf anderem Template in Template einbinden? Danwe TYPO3 4.x Fragen und Probleme 2 19.03.08 10:12
UID der ersten Subpage Garfieldius TYPO3 4.x Fragen und Probleme 3 18.06.07 16:20
Template Desaster - Vorlage sieht anders aus als Template Damned TemplaVoila 2 16.01.07 12:45
Neues Template angelegt: No template found! Lissy TYPO3 4.x Fragen und Probleme 0 17.10.06 08:37


Alle Zeitangaben in WEZ +1. Es ist jetzt 06:03 Uhr.


Powered by vBulletin® Version 3.6.8 Patch Level 2 (Deutsch)
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Template-Modifikationen durch TMS