Ich habe eine typo3 installation die aus mehreren Domains besteht. Ein Sys-Ordner habe ich Templates getauft und dort die Templates zu lagern, welche für alle Domains verwendet werden sollen. Eben der Standardcode.
Bei den einzelnen Domain-Einstiegsseiten wollte ich nun spezifischen Code lagern.
Bspw. für Analitycs. Leider habe ich da noch einen Logik fehler drin, jedenfalls igonriert Typo den Code der in den Einstiegsseiten steht komplett.
Seitenbaum:
- Templates
- Domain A (Wurzelebene, Clear Setung / TS)
- Domain B
Im Template-Ordner ist der folgende Code hinterlegt, welcher für beide Domains genutzt wird (funktioniert auch):
### Template Konfiguration für alle Domains ###
lib.headerimage = IMAGE
lib.headerimage {
file {
import = uploads/media/
import.data = levelmedia:-1, slide
treatIdAsReference = 1
import.listNum = 0
}
}
BOOKMARK < styles.content.getLeft
BOOKMARK = CONTENT
BOOKMARK {
tables = tt_content
select.where = colPos = 1
select.pidInList = 222
renderObj.stdWrap.wrap = |
}
FACEBOOK < styles.content.getLeft
FACEBOOK = CONTENT
FACEBOOK {
tables = tt_content
select.where = colPos = 1
select.pidInList = 192
renderObj.stdWrap.wrap = |
}
GOOGLEPLUS < styles.content.getLeft
GOOGLEPLUS = CONTENT
GOOGLEPLUS {
tables = tt_content
select.where = colPos = 0
select.pidInList = 192
renderObj.stdWrap.wrap = |
}
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
template = FILE
template.file = fileadmin/_temp_/index.html
workOnSubpart = DOCUMENT_BODY
#Header
marks.DATE = TEXT
marks.DATE.data = date : U
marks.DATE.strftime = %A, %d.%m.%Y
marks.HEADERIMAGE < lib.headerimage
#Content
marks.PRINT < PRINT
marks.PROMOTION_LEFT < styles.content.getLeft
marks.FACEBOOK < FACEBOOK
marks.GOOGLEPLUS < GOOGLEPLUS
marks.CONTENT < styles.content.get
#Footer
marks.BOOKMARK < BOOKMARK
marks.ANALITICS < temp.analytics
}
page = PAGE
page {
typeNum = 0
shortcutIcon = fileadmin/images/favicon.ico
10 < temp.mainTemplate
# CSS Includes
includeCSS.file45 = fileadmin/css/wt_socialbookmarks.css
includeCSS.file65 = fileadmin/css/rahmen.css
includeCSS.file85 = typo3conf/ext/st_socialnetwork/static/style03/style.css
includeCSS.file90 = fileadmin/css/nav.css
includeCSS.file95 = fileadmin/css/style.css
# JS Includes
includeJS.file15 = typo3conf/ext/imagecarousel/res/jquery/js/jquery-1.7.2.min.js
includeJS.file45 = fileadmin/includes/jquery.corner.min.js
includeJS.file55 = fileadmin/includes/superfish.js
}
Dieser Code steht in der Wurzelebene der jeweiligen Domain:
# Cool Uri
baseURL = http://www.domain.de/
# Google Webmaster Tools Verfikation
page.headerData.15 = HTML
page.headerData.15.value (
<meta name="google-site-verification" content="xxx" />
)
temp.analytics = TEXT
temp.analyitcs {
value (
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-xxxxxxxxx-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
)
}
Wie gesagt ist da wahrscheinlich ein blöder Fehler und die Lösung ganz einfach, nur ich komm nicht drauf ;(