![]() |
| | LinkBack | Themen-Optionen | Thema durchsuchen | Thema bewerten | Ansicht |
|
#1
| |||
| |||
| Hallo zusammen! Ich habe nach diesem Tutorial versucht eine weitere Sprache in Typo zu implementieren: typo3 Mehrsprachig Tutorial | Mehrsprachen | Sprachen Soweit hat die Konfiguration auch funktioniert. Nun würde ich aber gerne, dass meine 2 hardcodierten Links im Template automatisch geparst werden und diese mit der jeweiligen zugehörigen ID belegt werden. Da ich eh automaketemplate als Parser benutze, würde ich es gerne auch hier einheitlich halten. So sieht mein SETUP-Scripting bisher aus: Code: # 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/
}
# 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_0### subpart with dynamic menu:
subparts.menu_0 < temp.menu_0
# 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
page.10 = PHP_SCRIPT
page.10.file = fileadmin/scripts/sprachen.php
# 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
# SprachVariable L initialisieren
config.linkVars = L
# Standardsprache UID 0 -> Deutsch
config.sys_language_uid = 0
config.language = de
config.locale_all = de_DE
# Englisch, sys_language.uid = 1
[globalVar = GP:L = 1]
config.sys_language_uid = 1
config.language = en
config.locale_all = english
[global] Brauche ich eigentlich das PHP-Script? Dort steht folgendes: PHP-Code: Die beiden hardcodierten Links für die Sprachen im Template sehen so aus: <!-- ###languages### --> <a href="#" class="lang10">deutsch</a> | <a href="#" class="lang10">englisch</a> Wie kann ich das bei parsen des Templates mit dem Auto-Parser unter subparts berücksichtigen? Vielen Dank im Voraus! ![]() Grüße Bernhard |
| Sponsored Links |
![]() TYPO3 Forum.net empfiehlt domainFactory als Hoster! |
![]() |
| Themen-Optionen | Thema durchsuchen |
| Ansicht | Thema bewerten |
| |
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| Links werden im Frontend nicht als Link dargestellt! | mr-marlon | TYPO3 4.x Rich Text Editor | 2 | 21.08.07 21:12 |
| Untermenüpunkte werden nicht angezeigt | Pepe | GMENU, HMENU, TMENU und Co. | 3 | 23.03.07 16:07 |
| Produkte werden nicht angezeigt | tobip | tt_products | 2 | 28.05.06 12:39 |
| DIV-Inhalte werden nicht angezeigt | Adlerauge | TYPO3 3.x Fragen und Probleme | 1 | 24.05.06 19:29 |
| Bilder werden nicht angezeigt (bzw. nur bei upload nicht) | oleeinar | TYPO3 3.x Fragen und Probleme | 4 | 29.09.05 19:44 |