Zum Inhalt springen

tmplselector + automaketemplate - nichts wird angezeigt

Erstellt am 9. August 2005 · Noch keine Antworten

Tags: Templates & Layouts, Frage

mendragol ·

Hallo zusammen

Ich wälze mich seit einigen Tagen durch das Modern Template #1 und #2 PDF durch. Ich dachte, Teil 1 wäre auch ganz gut gegangen. Nun habe ich eine Website zuerst auf diese Art umgesetzt, das lief auch ganz gut. Nun möchte ich jedoch die Möglichkeiten von tmplselector nutzen. Fazit: Es wird nichts angezeigt. Ich habe versucht einzelne Teile auszukommentieren um dem Fehler auf die Spur zu kommen. Ich denke das Problem hat insbesondere mit automaketemplate zu tun.

"Es wird nichts angezeigt" bedeutet übrigens, dass alles zwischen dem body-Tag leer ist. Lediglich der Title-Tag wurde ersetzt und das JS ist eingefügt. Die Pfade zu den Templates stimmen. Beide Extensions sind installiert, die static templates content und styles.content sind auch installiert.

Ich wäre sehr froh, wenn mir jemand einen Ansatz oder womöglich sogar einen Fehler den ich gemacht habe sagen könnte. Ich hoffe das grundlegende Konzept ist passend.

Folgendermassen sieht mein (kompletter) TypoScript-Code aus:

# -----------------------------------------------------------
# PLUGINS
# -----------------------------------------------------------

######################
# PAGE TEMPLATE SELECTOR PLUGIN
######################
plugin.tx_rlmptmplselector_pi1 {
 templatePathMain = fileadmin/templates/main/
 templatePathSub = fileadmin/templates/sub/

 defaultTemplateFileNameMain = template_1.html
 defaultTemplateFileNameSub = subtemplate_1.html

 inheritMainTemplates = 1
 inheritSubTemplates = 1
}

######################
# TEMPLATE AUTO-PARSER PLUGIN
######################
plugin.tx_automaketemplate_pi1 {
 content < plugin.tx_rlmptmplselector_pi1
 content.defaultTemplateFileName = template_1.html

 elements {
  BODY.all = 1
  BODY.all.subpartMarker = DOCUMENT_BODY

  HEAD.all = 1
  HEAD.all.subpartMarker = DOCUMENT_HEADER
  HEAD.rmTagSections = title

  TD.all = 1
  TR.all = 1
  DIV.all = 1
 }

 relPathPrefix = fileadmin/
}

# -----------------------------------------------------------
# MARKERS
# -----------------------------------------------------------

######################
# TRAILER mark
######################
temp.TRAILER = IMAGE
temp.TRAILER.file = GIFBUILDER
temp.TRAILER.file {
 XY = [10.w]+[20.w]+30, 33
 backColor = #FFFFFF

 # dynamic subtitle text
 10 = TEXT
 10 {
  text.field = subtitle 
  fontSize = 11
  fontFile = fileadmin/fonts/univers_b.ttf
  fontColor = #FF0000
  niceText = 1
  offset = [10.w]+[20.w]+30-[10.w]-10, 25
 }

 # static LGK text
 20 < .10
 20 {
  text.field >
  text = LGK
  fontColor = #000000
  offset = [10.w]+[20.w]+30-[10.w]-[20.w]-15, 25
 }
}

######################
# MENUTOP mark
######################
includeLibs.gmenu_layers = media/scripts/gmenu_layers.php
temp.MENUTOP = HMENU
temp.MENUTOP.special = directory
temp.MENUTOP.special.value = 2
temp.MENUTOP.1 = GMENU_LAYERS
temp.MENUTOP.1 {
 layerStyle = position:absolute;VISIBILITY:hidden;
 lockPosition = x
 expAll = 1
 relativeToTriggerItem = 1
 topOffset = 0
 leftOffset = 0
 hideMenuWhenNotOver = 4
 hideMenuTimer = 500
}

temp.MENUTOP.1.NO {
 wrap = <td>|</td>
 expAll = 1
 backColor = #FFFFFF
 XY = 150, 33 |*| 150, 33 |*| [10.w] + 6, 33
 10 = TEXT
 10 {
  text.field = title
  fontSize = 13
  fontFile = fileadmin/fonts/univers_b.ttf
  fontColor = #FF0000
  align = left
  niceText = 1
  offset = 5, 25 |*| 5, 25 |*| 5, 25
 }
}

temp.MENUTOP.2 = GMENU
temp.MENUTOP.2.NO {
 wrap = |<br>
 expAll = 1
 backColor = #FFFFFF
 XY = 150, 33
 10 = TEXT
 10 {
  text.field = title
  fontSize = 13
  fontFile = fileadmin/fonts/univers_b.ttf |*| fileadmin/fonts/univers.ttf
  fontColor = #FF0000 |*| #000000 |*| #000000
  niceText = 1
  offset = 5, 25
 }
}

######################
# MENUPOS mark
######################
temp.MENUPOS = IMAGE
temp.MENUPOS.file = GIFBUILDER
temp.MENUPOS.file {
 XY = [10.w]+10, 33
 backColor = #FFFFFF

 # curent title text
 10 = TEXT
 10 {
  text.field = title 
  fontSize = 13
  fontFile = fileadmin/fonts/univers.ttf
  fontColor = #000000
  niceText = 1
  offset = 5, 24
 }
}

# -----------------------------------------------------------
# TEMPLATES
# -----------------------------------------------------------

######################
# MAIN-TEMPLATE
######################
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
 template =< plugin.tx_automaketemplate_pi1

 workOnSubpart = DOCUMENT_BODY

 subparts.TRAILER < temp.TRAILER
 subparts.MENUTOP < temp.MENUTOP
 subparts.MENUPOS < temp.MENUPOS
 subparts.CONTENT < styles.content.get
}

######################
# HEAD-TEMPLATE
######################
temp.headTemplate = TEMPLATE
temp.headTemplate {
 content < plugin.tx_automaketemplate_pi1

 workOnSubpart = DOCUMENT_HEADER
}

# -----------------------------------------------------------
# CONFIGS
# -----------------------------------------------------------

######################
# CONFIG
######################
# default type value
config.simulateStaticDocuments_noTypeIfNoTitle = 1

# -----------------------------------------------------------
# PAGES
# -----------------------------------------------------------

######################
# PAGE
######################
# 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

Folgendermassen sieht das Haupttemplate template_1.html aus:

<html>
<head>
 <title>Main template (default)</title>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<div width="100%" height="33" align="right" id="TRAILER">
</div>

<table width="984" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
 <td align="center">
	<table width="984" height="127" border="0" cellpadding="0" cellspacing="0">
	<tr>
	 <td width="339" height="127" valign="top" rowspan="2"><a href="index.html"><img src="images/logo.gif" width="339" height="127" alt="Homepage" border="0" /></a></td>
	 <td width="645" height="91" valign="bottom" align="right">
	 <table width="645" height="33" border="0" cellpadding="0" cellspacing="0" align="right">
	 <tr align="right">
	  <td id="MENUTOP">
	  </td>
	 </tr>
	 </table>
	 </td>
	</tr>
	<tr>
	 <td width="645" height="36" id="MENUPOS">
	 </td>
	</tr>
	</table>
 </td>
</tr>
<tr>
 <td width="984" height="408" align="right" valign="top">
 <table width="950" height="408" border="0" cellpadding="0" cellspacing="0">
 <tr>
  <td valign="top" id="CONTENT">
  </td>
 </tr>
 </table>
 </td>
</tr>
<tr>
 <td align="right">
 <table width="950" border="0" cellpadding="0" cellspacing="0">
 <tr>
  <td valign="top" id="PDF">
  </td>
 </tr>
 </table>
 </td>
</tr>
</table>

</body>
</html>