AW: [Typo3-UG Oesterreich] Template Selector un das Problem mit d em Content
WASINGER Walter
walter.wasinger at it-austria.com
Tue Apr 26 09:07:51 CEST 2005
Hallo Erich,
also folgender Script funktioniert:
config.language = de
config.locale_all=deutsch
// Set Default-Display-Layout for Dates in Aktuelles-Archiv
plugin.tt_news.displaySingle.date_stdWrap.strftime = %e. %B %Y
plugin.tt_news.displayLatest.date_stdWrap.strftime = %e. %B %Y
plugin.tt_news.displayList.date_stdWrap.strftime = %e. %B %Y
// --- SET UP TEMPLATE SELECTOR
-----------------------------------------------
plugin.tx_rlmptmplselector_pi1 {
// Define the paths leading to our HTML template files
templatePathMain = fileadmin/templates/main_designs/
templatePathSub = fileadmin/templates/sub_designs/
// Define the filenames used as the default HTML templates
defaultTemplateFileNameMain = m_normal.htm
defaultTemplateFileNameSub = s_normal.htm
// If there is a page having no template selected, use a template
// selected earlier in the rootline. If there is none, use the default
inheritMainTemplates = 1
inheritSubTemplates = 1
}
// --- CONFIGURE THE AUTOMAKETEMPLATE EXTENSION --------------------------
//Configuring the Auto-Parser for Indexpage:
plugin.tx_automaketemplate_pi1 {
// Use Template-Selector for Substitution
content < plugin.tx_rlmptmplselector_pi1
// 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
UL.all = 1
TD.all = 1
}
}
temp.navigation = HMENU
temp.navigation.entryLevel = 1
temp {
navigation {
// First level menu-object
1 = TMENU
1 {
// wrap with unordered list
expAll = 0
wrap = |
NO {
allWrap = <li class="navigationl1"> | </li>
ATagParams = class="w"
}
}
// Second level menu-object
2 = TMENU
2 {
wrap = <ul id="navigationl2"> | </ul>
NO {
allWrap = <li class="navigationl2"> | </li>
ATagParams = class="w"
}
}
}
}
temp.standard_info = COA
// Insert Statistikinfo
temp.standard_info.10 = HTML
temp.standard_info.10.value = <div id="lastupdate">
temp.standard_info.20 =< plugin.tx_italastupdate_pi1
temp.standard_info.30 = HTML
temp.standard_info.30.value = </div>
// Insert Backlink-Chain
temp.standard_info.50 = HMENU
temp.standard_info.50.special = rootline
temp.standard_info.50.special.range = 0|-1
temp.standard_info.50.1 = TMENU
temp.standard_info.50.1.wrap = <div id="backlinks"> | Sie befinden sich
hier!</div>
temp.standard_info.50.1.NO.linkWrap = | ◄
temp.headTemplate = TEMPLATE
temp.headTemplate {
template =< plugin.tx_automaketemplate_pi1
workOnSubpart = DOCUMENT_HEADER
}
temp.contentAreaTemplate = TEMPLATE
temp.contentAreaTemplate.template =< plugin.tx_automaketemplate_pi1
// Modify the template selector config: This is a sub template!
temp.contentAreaTemplate.template.content.templateType = sub
workOnSubpart = DOCUMENT_BODY
// Substitute the ###content_left### subpart with page content left:
temp.contentAreaTemplate.subparts.content_left < styles.content.getLeft
// Substitute the ###content_middle### subpart with Linklist:
temp.contentAreaTemplate.subparts.content_middle < styles.content.get
// Substitute the ###content_right### subpart with page content right:
temp.contentAreaTemplate.subparts.content_right < styles.content.getRight
// Substitute the ###lastchange### subpart with page content border:
temp.contentAreaTemplate.subparts.content_bottom < styles.content.getBorder
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
template =< plugin.tx_automaketemplate_pi1
// Modify the template selector config: This is a sub template!
template.content.templateType = main
workOnSubpart = DOCUMENT_BODY
// Substitute the ###navigationl1### subpart with dynamic menu:
<-------Nur bei Indexseite
subparts.navigationl1 < temp.navigation
// Substitute the ###backlinks### subpart with dynamic menu:
subparts.standard_info < temp.standard_info
// Substitute the ###content### from sub-template:
subparts.content_area < temp.contentAreaTemplate
}
page = PAGE
page.typeNum = 0
page.headerData.10 < temp.headTemplate
page.10 < temp.mainTemplate
// Seitentitel einbasteln
page.20 = HTML
page.20.value = <div id="titel">
page.30 = TEXT
page.30.field = title
page.40 = HTML
page.40.value = </div>
____________________________________________________________________________
___________________
Dazu gibts z.B. folgende HTMLs:
MAIN:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Inhaltsseite</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="HTML-Generator" content="CMS/Typo3" />
<meta name="TypoScript" content="W. Wasinger" />
<meta name="CSS" content="W. Wasinger" />
<meta name="HTML-Template" content="W. Wasinger" />
<!-- Achtung, alle Änderungen in diesem HTML-Maintemplate ziehen Änderungen
in den Typo-Scripts,
sowie eventuell in den HTML-Subtemplates und Stylesheets nach sich.
Bitte alle Änderungen mittels Kommentarzeilen
dokumentieren!!!!!!!!!!!!!!!!!!!!!!! -->
<link href="fileadmin/css/intra_standard.css" rel="stylesheet"
type="text/css">
<link href="fileadmin/css/intra_content.css" rel="stylesheet"
type="text/css">
<link href="fileadmin/css/intra_tables.css" rel="stylesheet"
type="text/css">
<link href="fileadmin/css/intra_print.css" rel="stylesheet" type="text/css"
media="print">
</head>
<body>
<div id="head">
<div id="backtoit"><a
href="http://intra.it-austria.com/cms2/intra-dummy"><img
src="fileadmin/images/images_admin/backtoit.gif"
class="noborder" /></a>
</div>
</div>
<hr id="uebtrenn" noshade color="red"/>
<div id="standard_info">
Hier kommen Backlinks und Statistikinfo
</div>
<!-- Seiteninhaltselemente -->
<div id="content_area">
Hier werden (hoffentlich) die Content-HTML-Subparts
eingefügt
</div>
</body>
</html>
____________________________________________________________________________
_______________
SUB:
<!-- Einzufügender Contentteil für normale Seiten-->
<div class="content_left">
</div>
<div class="content_middle">
</div>
<div class="content_right">
</div>
<div class="content_bottom">
</div>
<!-- Ende Einzufügender Contentteil für normale Seiten-->
-----Ursprüngliche Nachricht-----
Von: Erich Wappis [mailto:jameson at sbox.tugraz.at]
Gesendet: Sonntag, 24. April 2005 15:28
An: TYPO3 Usergroup Oesterreich
Betreff: [Typo3-UG Oesterreich] Template Selector un das Problem mit dem
Content
Hallo !
Ich versuche schon seit einiger Zeit den Template Selector im TS oder im
file Modus zum laufen zu kriegen, bis jetzt leider mit wenig Erfolg.
Ich habe mir die Doku schon eineige Male durchgelesen und bin immer noch
nicht schlauer. Derzeit scheitere ich gerade daran Content
in die Content Area zu kriegen.
Vielleicht hat eine(r) von euch eine Idee wo ich noch was nachlesen
könnte, oder wo ich ein funktionierendes Beispiel ausprobieren kann.
Vielen Dank im Voraus
Erich Wappis
_______________________________________________
Typo3-at mailing list
Typo3-at at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-at
More information about the TYPO3-at
mailing list