jip.
mini-tutorial findest du unter
> www.plug-one.de/show_content_lrb.html
jip.
mini-tutorial findest du unter
> www.plug-one.de/show_content_lrb.html
Bin zwar auch noch kein Profi...aber das ist leicht zu finden......
Steht hier...... http://www.typo3forum.de/viewtopic.php?t=23065&sid=005fdb22e2ce53ce744e9e496b5c1d34
Das hatte ich schon vor Wochen durch.... #giggle#
Hi,
danke erstmal fuer die antworten, aber
lynatic:
Wenn ich den kram in meinen setup poste, dann wird in dem rechten Content falscher inhalt angezeigt 🙁
(Es wird der Inhalt aus dem 'Normal'-Content angezeigt)
bajun:
Mh das is nich das was ich suche 🙁
Da ich anfaenger bin braeuchte ich einen Beispielcode, so wie das von lynatic.. 🙁
webdeveloper:
Mh ja gut.. aber ich habe kein
page.10 < styles.content.get
🙁
lynatic schriebHallo!
setze auch rechts (in einer eigenen tabelle) einen marker, bsp: ###RECHTS###
+ setup:
RECHTS = CONTENT RECHTS { table = tt_content select.orderBy = sorting select.where = colPos = 2 }
der code ist nciht für copy+paste gedacht...
da fehlt jeweils das "seite."
das was du brauchst, sieht final so aus:
seite = PAGE
seite {
typeNum = 0
bodyTag = <body>
10 = TEMPLATE
10.template = FILE
10.template.file = fileadmin/template.html
10.workOnSubpart = DOKUMENT
10.marks {
RECHTS < temp.rechts
LINKS < temp.links
}
}
lege nun ein neues template an.
temp.rechts = CONTENT
temp.rechts {
table = tt_content
select.orderBy = sorting
select.where = colPos = 2
}
das template musst du dann nur noch in dein master/root template integrieren.
dies machst du über den punkt
Click here to edit whole template record, dann runter bis Include basis template:.
dort fügst du dein neues template (z.b. + temp.rechts) hinzu.
hoffe das war jetzt verständlich, habe z.zt. nur wenig zeit...
ausführlicher kann ich dir heute abend helfen, wenn du es jetzt nicht schaffst.
Du hast Objekte denen Du was zuordnest. Am einfachsten machst Du das bei Text, in dem Du statische Templates einbindest.
D.h.:
statische Templates einbinden: z.b. content (default) und cSet stylesheet.
Dann: Marker in Deiner HTML Vorlage setzen (CONTENT, CONTENT_RIGHT, CONTENT_LEFT)
Die Marker dann bedienen mit styles.content.get, styles.content.getRight, styles.content.getLeft)
Dann brauchst Du Dich nicht mit colPos etc. herumschlagen. Der Zuweisungsoperator ist <
Viele Grüße
Niki
NACHTRAG: Oder Du machst es so wie webdeveloper schreibt 🙂 Waren wir wohl gleichzeitig.
Hey 🙂
Werde sicherlich darauf zurueckkommen 😉
Naja werde jetz mal mein bestes geben und das mal ausprobieren..
Danke erstmal 🙂
So,
da ich es natuerlich NICHT hinbekommen habe (schade 🙁 ) hier nochmal meine aktuelle Template-Setup (ist in 3 teile aufgeteilt, die ins Haupt-Template geladen werden.)
ext: Main TEMPLATE cObject
----------------------------------------
# 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 ###menu_1### subpart with dynamic menu:
subparts.menu_1 < temp.menu_1
# Substitute the ###content### subpart with some example content:
subparts.content < styles.content.get
}
# Main TEMPLATE cObject for the HEAD
temp.headTemplate = TEMPLATE
temp.headTemplate {
# Feeding the content from the Auto-parser to the TEMPLATE cObject:
template =< plugin.tx_automaketemplate_pi1
# Select only the content between the <head>-tags
workOnSubpart = DOCUMENT_HEADER
}
# Default PAGE object:
page = PAGE
page.typeNum = 0
# Copying the content from TEMPLATE for <body>-section:
page.10 < temp.mainTemplate
# Copying the content from TEMPLATE for <head>-section:
page.headerData.10 < temp.headTemplate
----------------------------------------
----------------------------------------
ext: Menu 1
----------------------------------------
# Menu 1 cObject
temp.menu_1 = HMENU
# First level menu-object, textual
temp.menu_1.1 = TMENU
temp.menu_1.1 {
# Normal state properties
NO.allWrap = <div class="menu1-level1-no"> | </div>
NO.stdWrap.htmlSpecialChars = 1
# Enable active state and set properties:
ACT = 1
ACT.stdWrap.htmlSpecialChars = 1
ACT.allWrap = <div class="menu1-level1-act"> | </div>
}
# Second level menu-object, textual
temp.menu_1.2 = TMENU
temp.menu_1.2 {
# Normal state properties
NO.allWrap = <div class="menu1-level2-no"> | </div>
NO.stdWrap.htmlSpecialChars = 1
# Enable active state and set properties:
ACT = 1
ACT.stdWrap.htmlSpecialChars = 1
ACT.allWrap = <div class="menu1-level2-act"> | </div>
}
# Third level menu-object, textual
temp.menu_1.3 = TMENU
temp.menu_1.3 {
# Normal state properties
NO.allWrap = <div class="menu1-level3-no"> | </div>
NO.stdWrap.htmlSpecialChars = 1
# Enable active state and set properties:
ACT = 1
ACT.stdWrap.htmlSpecialChars = 1
ACT.allWrap = <div class="menu1-level3-act"> | </div>
}
# Fourth level menu-object, textual
temp.menu_1.4 = TMENU
temp.menu_1.4 {
# Normal state properties
NO.allWrap = <div class="menu1-level4-no"> | </div>
NO.stdWrap.htmlSpecialChars = 1
# Enable active state and set properties:
ACT = 1
ACT.stdWrap.htmlSpecialChars = 1
ACT.allWrap = <div class="menu1-level4-act"> | </div>
}
----------------------------------------
----------------------------------------
ext: Auto-parser plugin
----------------------------------------
# Configuring the Auto-Parser for main template:
plugin.tx_automaketemplate_pi1 {
# Read the template file:
content = FILE
content.file = fileadmin/template/main/template_1.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
TD.all = 1
}
# Prefix all relative paths with this value:
relPathPrefix = fileadmin/template/main/
}
Es existiert auch das ###RECHTS### in der HTML-Seite..
Aber irgendwie will das alles nich so wie ich das ausprobiert hatte 🙁
Kann mir jemand sagen wo was da rein muss?
Momentan wird im 'Rechts'-Bereich der template-datei halt automatisch der Kram aus dem 'Normal'-bereich angezeigt :-/
Ich glaub 18Std pro Tag am Rechner sitzen macht blind...
Wo steht der Marker rechts?? Also im TS
In einer Extra-Spalte auf der rechten Seite.
Hier die aktuelle Template-Source 🙂
<?xml version="1.0" excoding="iso.8859-1"?>
<?xml-stylesheet href="#internalStyle" type="text/css"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EM"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transidional.dtd">
<html>
<head>
<title>Base template, header, menu, content and footer.</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<style type="text/css" id="internalStyle">
/*<![CDATA[*/
BODY { margin: 0 0 0 0; background-color: white; }
/*]]>*/
</style>
<link href="res/stylesheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0">
<!-- Header image row: -->
<tr>
<td colspan="3" id="header_1"><img src="images/headerimage.jpg" width="600" height="100" alt="" border="0" /></td>
</tr>
<tr>
<!-- Menu table cell: -->
<td width="200" id="menu_1">
<div class="menu1-level1-no"><a href="#">Menu item 1</a></div>
<div class="menu1-level1-no"><a href="#">Menu item 2</a></div>
<div class="menu1-level1-act"><a href="#">Menu item 3 (act)</a></div>
<div class="menu1-level2-no"><a href="#">Level 2 item</a></div>
<div class="menu1-level2-no"><a href="#">Level 2 item</a></div>
<div class="menu1-level2-act"><a href="#">Level 2 item (act)</a></div>
<div class="menu1-level1-no"><a href="#">Menu item 2</a></div>
</td>
<!-- Page Content Area table cell: -->
<td width="460" id="content">
<h1>Buy PaperShredder(tm) Gizmo with 30-days money-back guarantee!</h1>
<img src="images/paperwork.jpg" width="192" height="156" border="0" alt="" align="right"/>
<p class="bodytext">jhsdfghjfsdgsdjfghdhfjghdfgdfgkdfhkgdfvbk</p>
<p class="bodytext">jhsdfghjfsdgsdjfghdhfjghdfgdfgkdfhkgdfvbk</p>
<br />
</td>
<td width="160">###RECHTS###</td>
</tr>
<!-- Footer row: -->
<tr>
<td colspan="3" id="footer">
<p>Main Dish & Son inc. * 12345 MuhKuh City, suite 1337 * Hannover</p>
</td>
</tr>
</table>
</body>
</html>
###RECHTS### is das
//Nachtrag:
Ah hatte das mit der id="content" uebersehen.
(<td width="160" id="content">###RECHTS###</td>)
Jetzt momentan steht in der Augabedatei rechts nur '###RECHTS###' und das moechte ich so schnell wie moeglich mit Inhalt gefuellt bekommen, also was muss ich dafuer tun?
Danke 🙂
dann hast du den marker in T3 nicht ersetzt, oder - wenn du es mit einem neuen template gemacht hast - dieses nicht in den master eingebunden...
check das ganze mal, ob gib mir/uns einen zugang zu deinem T3.....
Mh das problem is dass die ganze kiste local auf nem apache in meiner Firma steht.. Und die kiste is halt nicht ans Internet (solange es nicht richtig laeuft; ist nen Auftrag vom chef) angebunden, also kann ich da niemanden dran 'rumspielen' lassen 🙁
Zum Thema:
Es ging ja darum wie man mit T3 den Marker ersetzt, also was genau ich da reinschreiben muss damit es ersetzt wird 🙂
Ich wuerde das ganze testweise einfach mal in ein neues Template (also T4) einfuegen und an das Root-Template anhaengen.
Nur was ich in das neue template eingeben soll, DAS ist es was ich nicht weiss.
Morgen Fabian,
schau mal meinen Post etwas weiter oben an.
Da steht, WAS du im root template schreibst, und WAS in das neue Template geschrieben wird 😉
wer lesen kann, ..... du weisst schon *g*
Moin 🙂
Ja das habe ich ja jetzt alles,
aber es wird mir nur eine leere Seite angezeigt.
Verweise (zur Templatedatei etc.) sind alle korrekt angelegt.
Aber wie gesagt:
Ich habe nur eine leere weisse Seite 🙁
Ich habe jetzt die html-Seite (siehe oben), das Root-Template mit folgendem Inhalt
seite = PAGE
seite {
typeNum = 0
bodyTag = <body>
10 = TEMPLATE
10.template = FILE
10.template.file = fileadmin/main/template_1.html
10.workOnSubpart = DOCUMENT_BODY
10.marks {
RECHTS < temp.rechts
LINKS < temp.links
}
}
und das T4 mit folgendem Inhalt
temp.rechts = CONTENT
temp.rechts {
table = tt_content
select.orderBy = sorting
select.where = colPos = 2
}
T4 is beim Root-Template eingebunden,
allerdings ist (wie gesagt) nur eine weisse Seite zu sehen.
10.workOnSubpart = DOCUMENT_BODY
Hast du in deinem Template auch
<!-- DOCUMENT_BODY -->
gesetzt?
So, also es muss irgendwie an dem Body-Kram liegen, denn der Titel der Seiten wird korrekt angezeigt..
dann poste doch mal das template hier 😉
vllt. haste ja ne klammer net geschlossen, oder aber nen kommentar durchlaufen lassen. *who knows*
Also, hier nochmal ALLES was ich an source habe:
Root-Template
seite = PAGE
seite {
typeNum = 0
bodyTag = <body>
10 = TEMPLATE
10.template = FILE
10.template.file = fileadmin/template/main/template_1.html
10.workOnSubpart = DOCUMENT_BODY
10.marks {
RECHTS < temp.rechts
#LINKS < temp.links
}
}
ext: Main TEMPLATE cObject:
# 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 ###menu_1### subpart with dynamic menu:
subparts.menu_1 < temp.menu_1
# Substitute the ###content### subpart with some example content:
subparts.content < styles.content.get
}
# Main TEMPLATE cObject for the HEAD
temp.headTemplate = TEMPLATE
temp.headTemplate {
# Feeding the content from the Auto-parser to the TEMPLATE cObject:
template =< plugin.tx_automaketemplate_pi1
# Select only the content between the <head>-tags
workOnSubpart = DOCUMENT_HEADER
}
# Default PAGE object:
page = PAGE
page.typeNum = 0
# Copying the content from TEMPLATE for <body>-section:
page.10 < temp.mainTemplate
# Copying the content from TEMPLATE for <head>-section:
page.headerData.10 < temp.headTemplate
ext: Menu 1
# Menu 1 cObject
temp.menu_1 = HMENU
# First level menu-object, textual
temp.menu_1.1 = TMENU
temp.menu_1.1 {
# Normal state properties
NO.allWrap = <div class="menu1-level1-no"> | </div>
NO.stdWrap.htmlSpecialChars = 1
# Enable active state and set properties:
ACT = 1
ACT.stdWrap.htmlSpecialChars = 1
ACT.allWrap = <div class="menu1-level1-act"> | </div>
}
# Second level menu-object, textual
temp.menu_1.2 = TMENU
temp.menu_1.2 {
# Normal state properties
NO.allWrap = <div class="menu1-level2-no"> | </div>
NO.stdWrap.htmlSpecialChars = 1
# Enable active state and set properties:
ACT = 1
ACT.stdWrap.htmlSpecialChars = 1
ACT.allWrap = <div class="menu1-level2-act"> | </div>
}
# Third level menu-object, textual
temp.menu_1.3 = TMENU
temp.menu_1.3 {
# Normal state properties
NO.allWrap = <div class="menu1-level3-no"> | </div>
NO.stdWrap.htmlSpecialChars = 1
# Enable active state and set properties:
ACT = 1
ACT.stdWrap.htmlSpecialChars = 1
ACT.allWrap = <div class="menu1-level3-act"> | </div>
}
# Third level menu-object, textual
temp.menu_1.4 = TMENU
temp.menu_1.4 {
# Normal state properties
NO.allWrap = <div class="menu1-level4-no"> | </div>
NO.stdWrap.htmlSpecialChars = 1
# Enable active state and set properties:
ACT = 1
ACT.stdWrap.htmlSpecialChars = 1
ACT.allWrap = <div class="menu1-level4-act"> | </div>
}
ext: Auto-parser plugin
# Configuring the Auto-Parser for main template:
plugin.tx_automaketemplate_pi1 {
# Read the template file:
content = FILE
content.file = fileadmin/template/main/template_1.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
TD.all = 1
}
# Prefix all relative paths with this value:
relPathPrefix = fileadmin/template/main/
}
temp.rechts
temp.rechts = CONTENT
temp.rechts {
table = tt_content
select.orderBy = sorting
select.where = colPos = 2
}
So, das waren jetz die Template-Datein.
Alle Templates sind in das erste Template (Root-Template) verlinkt.
Reihenfolge:
ext: Auto-parser plugin
ext: Menu 1
ext: Main TEMPLATE cObject
temp.rechts
Hier jetzt meine HTML-Template-Source:
<?xml version="1.0" excoding="iso.8859-1"?>
<?xml-stylesheet href="#internalStyle" type="text/css"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EM"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transidional.dtd">
<html>
<head>
<title>Base template, header, menu, content and footer.</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<style type="text/css" id="internalStyle">
/*<![CDATA[*/
BODY { margin: 0 0 0 0; background-color: white; }
/*]]>*/
</style>
<link href="res/stylesheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0">
<!-- Header image row: -->
<tr>
<td colspan="3" id="header_1"><img src="images/headerimage.jpg" width="600" height="100" alt="" border="0" /></td>
</tr>
<tr>
<!-- Menu table cell: -->
<td width="200" id="menu_1">
<div class="menu1-level1-no"><a href="#">Menu item 1</a></div>
<div class="menu1-level1-no"><a href="#">Menu item 2</a></div>
<div class="menu1-level1-act"><a href="#">Menu item 3 (act)</a></div>
<div class="menu1-level2-no"><a href="#">Level 2 item</a></div>
<div class="menu1-level2-no"><a href="#">Level 2 item</a></div>
<div class="menu1-level2-act"><a href="#">Level 2 item (act)</a></div>
<div class="menu1-level1-no"><a href="#">Menu item 2</a></div>
</td>
<!-- Page Content Area table cell: -->
<td width="460" id="content">
<h1>Buy PaperShredder(tm) Gizmo with 30-days money-back guarantee!</h1>
<img src="images/paperwork.jpg" width="192" height="156" border="0" alt="" align="right"/>
<p class="bodytext">jhsdfghjfsdgsdjfghdhfjghdfgdfgkdfhkgdfvbk</p>
<p class="bodytext">jhsdfghjfsdgsdjfghdhfjghdfgdfgkdfhkgdfvbk</p>
<br />
</td>
<td width="160">###RECHTS###</td>
</tr>
<!-- Footer row: -->
<tr>
<td colspan="3" id="footer">
<p>Main Dish & Son inc. * 12345 MuhKuh City, suite 1337 * Hannover</p>
</td>
</tr>
</table>
</body>
</html>
Ich hoffe da findet jemand was.
Sonst bin ich ehrlich gesagt voll am Arsch!
wo hast du z.b. temp.mainTemplate definiert?? also im root...
nirgendwo, benutzt es aber in ext. ts "Main TEMPLATE cObject"
mal abgesehen davon, dass das root und das main TS sehr viele gemeinsamkeiten haben... (viel doppelt!!)
temp.headTemplate
beispielsweise ist auch nirgends definiert!
das muss alles da rein
10.marks {
RECHTS < temp.rechts
#LINKS < temp.links
}
ich find das eh alles ziemlich umständlich. Kann man natürlich so machen, aber für den ersten Versuch schon bisschen aufwändig.
Warum probierst Du nicht den Weg über die statischen Templates und styles.content.get etc? Damit bringst Du Dein TS Template auf 20% runter womit Du Dich sicher erst mal einfach tust.
Viele Grüße
Niki
Mh solange es funktioniert ist mir erstmal egal wie ich das mache!!!!!!!
Aber wie laeuft das mit dem statischen?
Wo finde ich da ein Tutorial?
Mein Haupt-problem sind halt die Links/Normal/Rechts/Rand-Contents, also wie ich die anzeigen lasse, also wie genau da der TypoScript-Source lauten muss.
(Wenn es fuer den Anfang einfacher is, isses natuerlich besser. Denn es muss so schnell wie moeglich fertig werden..)