Hallo,
so nachdem ich eine ganze Weile mit Typo3 arbeite und es auch sehr interessant finde und eigentlich zumindest mit den "vorgefertigten" Templates usw. klarkomme wollte ich mal ein wenig weiter gehen und selber Templates bauen. Prinzipiell funktioniert das auch ganz gut, allerdings habe ich jetzt ein Problem mit den Menus... Das fängt da an, dass das Menu gar nicht angezeigt wird, wenn ich die Seite aufrufe, klicke ich dann aber auf meine Link zum Seitentitel tut sich zwar was, aber genau das kann ich nicht nachvollziehen, ich bekomme dann an der Stelle mit den Menus die Meldung "[an error occurred while processing this directive]" was ja soviel heißt, wie das ein Problem bei der Verarbeitung des zugehörigen Scripts auftrat. Leider kann ich aber genau das Problem nicht lokalisieren und stehe jetzt ganz schön auf dem Schlauch, da ich ja auch Termine einhalten muss. Viel. kann mir hier jemand helfen... Wäre auf jeden Fall dankbar. Gesucht habe ich auch schon, aber nicht das passende was ich wollte gefunden...
Der Ausschnitt aus deinem HTML-Template und das dazugehörige TypoScript (Setup) wäre nicht schlecht.
wegmel
Sorry, hab ich irgendwie vergessen...
erst mal der HTML-Teil
<!-- ###SUB_MENU_ITEM### begin
This is a single menu item
-->
<tr>
<td height="25" align="right">
<div align="left">
<img src="media/uploads/crcph/pil.gif" width="10" height="10" alt="" /></div>
</td>
<td height="25" align="right">
<div align="left">
<font face="Verdana, Arial, Helvetica, sans-serif" size="1"><!--###LINK###-->###MENU_TITLE###<!--###LINK###--></font></div>
</td>
</tr>
<tr bgcolor="#0043A1">
<td align="right"></td>
<td align="right">
<div align="left">
<img src="navi/clear.gif" width="1" height="1" alt="" /></div>
</td>
</tr>
<!-- ###SUB_MENU_ITEM### end -->
<!-- ###SUB_MENU_ITEM_ACT### begin
This is a single menu item, active mode
-->
<tr>
<td bgcolor="white" height="25" align="right">
<div align="left">
<img src="media/uploads/crcph/pil2.gif" width="10" height="10" alt="" /></div>
</td>
<td bgcolor="white" height="25" align="right">
<div align="left">
<font face="Verdana, Arial, Helvetica, sans-serif" size="1"><!--###LINK###--><strong>###MENU_TITLE###</strong><!--###LINK###--></font></div>
</td>
</tr>
<tr bgcolor="#0043A1">
<td align="right"></td>
<td align="right">
<div align="left">
<img src="navi/clear.gif" width="1" height="1" alt="" /></div>
</td>
</tr>
<!-- ###SUB_MENU_ITEM_ACT### end -->
<tr bgcolor="#D6D3CE">
<td align="right"></td>
<td align="right"><img src="navi/clear.gif" width="1" height="1" alt="" /></td>
</tr>
<!-- ###SUB_MENU### end -->
</table>
</td>
und hier noch das Typoscript... (ich nehm mal das ganze, nicht das der Fehler woanders liegt, als wo ich suche)
# Configuring the Auto-Parser for main template:
plugin.tx_automaketemplate_pi1 {
# Read the template file:
content = FILE
content.file = fileadmin/templ/main.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/templ/
}
# 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 ###SUB_MENU### subpart with some example content:
subparts.menu_1 = TEXT
subparts.menu_1.value = HELLO WORLD - MENU
# Substitute the ###SUB_CONTENT### subpart with some example content:
subparts.content = TEXT
subparts.content.value = HELLO WORLD - CONTENT
}
# 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
# Substitute the ###SUB_MENU### subpart with some example content:
subparts.menu_1 = TEXT
subparts.menu_1.value = HELLO WORLD - MENU
So wie ich das sehe heisst dein Subpart im HTML-Template ###SUB_MENU###!
Du ersetzt im Typoscript aber den Subpart menu_1.
wegmel
Manchmal sieht man halt den Wald vor lauter Bäumen nicht... sch... Copy & Paste Fehler dauernd