Antwort
 
LinkBack Themen-Optionen Thema bewerten Ansicht
  #1  
Alt 13.06.08, 11:47
Forum Newbie
 
Registriert seit: 10.01.08
Alter: 25
Beiträge: 15

2 Templates je nach Inhalt


Hallo,

versuche seit Tagen mein TS so zum Laufen zu bekommen dass mir je nach Inhalt 2 verschiedene Templates gewählt werden. Aber rgendwie läuft die if.isTrue nicht richtig. Es wird nur die 2te (also die if.isFalse) verwendet. Der Inhaltsmarker der das ganze aktivieren soll heisst module1.

Aber hier mal ein Auszug noch aus meiner extTables.php damit keine Unklarheiten aufkommen:

PHP-Code:
t3lib_extMgm::addPageTSConfig('mod.SHARED.colPos_list = 0,1,2,3,4,5,6,7,8,9');



$TCA["tt_content"]["columns"]["colPos"]["config"]["items"] = array (

"0" => array ("2colleft||2ColLeft||||||||","0"),
"1" => array ("2colright||2ColRight||||||||","1"),

"4" => array ("module1||Modul1||||||||","4"),
"5" => array ("module2||Modul2||||||||","5"),
"6" => array ("module3||Modul3||||||||","6"),


); 
Und hier mal mein TScript:

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:
seite = PAGE
seite {
typeNum = 0
bodyTag = <body onload="">
includeCSS.file1000 = fileadmin/templates/2-3col/css/main.css
meta.AUTHOR = D4Media.eu
meta.DESCRIPTION = Cordless Radio
config.doctype = xhtml_strict    
10 = COA
10 {
if.isTrue.numRows < styles.content.module1
10 = TEMPLATE
10 {
template = FILE
template.file = fileadmin/templates/2-3col/index.html
<INCLUDE_TYPOSCRIPT: source="FILE:fileadmin/tscript/template_marker.ts" >
}

}
20 = COA
20 {
if.isFalse.numRows < styles.content.module1
10 = TEMPLATE
10 {
template = FILE
template.file = fileadmin/templates/2-3col/index2.html
<INCLUDE_TYPOSCRIPT: source="FILE:fileadmin/tscript/template_marker.ts" >
}

}  

}
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
  #2  
Alt 13.06.08, 19:04
dst dst ist offline
Forum Newbie
 
Registriert seit: 27.02.07
Alter: 26
Beiträge: 28

Soweit ich weiß, kannst Du if nicht auf diese (naheliegende) Weise ausführen, stattdessen irgendwie so in der Art:

Typoscript-Code:
1:
2:
3:
4:
5:
#if.isTrue.numRows < styles.content.module1
if {
value = numRows
isLessThan = styles.content.module1
}

Typoscript-Code:
1:
2:
3:
4:
5:
6:
#if.isFalse.numRows < styles.content.module1
if {
value = numRows
isLessThan = styles.content.module1
negate = 1
}

Bin mir nicht sicher, woher numRows und styles.content.module1 kommen bzw. wie sie dann eingefügt werden können (z.B. {$const} für etwas aus dem Constant-Bereich oder value.field= bzw. isLessThan.field= für Datensatzfelder).
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

Lesezeichen

Themen-Optionen
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 hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-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
3 verschiedene Templates je nach Spaltenbelegung minimalize TYPO3 4.x Fragen und Probleme 1 25.06.08 19:27
Inhalt nach dem Bodytext Denny1987 TYPO3 4.x Fragen und Probleme 3 20.06.08 16:00
Kein Menüpunkt Templates nach Installation petersku TYPO3 4.x Installation und Updates 2 15.04.08 10:58
joomla templates nach typo3 migrieren? zwiebug TYPO3 4.x Fragen und Probleme 1 27.01.07 00:02
Gleicher Inhalt an gleicher Stelle bei verschiedenen Templates tobo TemplaVoila 4 24.02.06 12:32


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


Powered by vBulletin® Version 3.7.3 (Deutsch)
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0