[TYPO3-core] Typoscript bug?
Robert Wildling
robertwildling at gmail.com
Tue Jun 26 14:52:29 CEST 2012
Hi, Philipp,
Thanks for your response!
I have a seperate SysFolder for the Typoscripts, one of which is called
menues, another one pages (among others).
This is the Menu-TS:
############################################################################
### MENUES
############################################################################
temp.MENU_MAIN = HMENU
temp.MENU_MAIN {
entryLevel = 0
1 = TMENU
1 {
expAll = 1
collapse = 0
wrap = <ul class="menu-level-1">|</ul>
NO = 1
NO {
wrapItemAndSub = <li class="first" id="MENU-01"><a
href="index.php">{$logoInMainMenu}</a>|</li> |*| <li
id="MENU-02">|</li> || <li id="MENU-03">|</li> || <li
id="MENU-04">|</li> |*| <li class="last" id="MENU-05">|</li>
ATagTitle.field = nav_title // title // subtitle
ATagParams = class="active"
ATagParams.if.value.data = GP:category
ATagParams.if.isInList.field = uid
}
ACT < .NO
ACT {
ATagParams >
ATagParams =
ATagParams = class="first active" |*| class="active" |*|
class="last active"
}
ACTIFSUB < .ACT
}
2 < .1
2 {
wrap = <ul class="menu-level-2">|</ul>
NO {
wrapItemAndSub = <li class="first">|</li> |*| <li>|</li> |*| <li
class="last">|</li>
wrapItemAndSub.override = <li class="first arrow">|</li> |*| <li
class="arrow">|</li> |*| <li class="last arrow">|</li>
wrapItemAndSub.override.if.value.field = pid
wrapItemAndSub.override.if.equals = 3
after.cObject = COA
after.cObject {
10 < plugin.tx_rwhersteller_pi1
10 {
category.field = uid
//additionalParams.dataWrap = &menu={field:pid},{field:uid}
linkWrap = <li>|</li>
linkWrap.override = <li class="active arrow">|</li>
linkWrap.override.if.value.data = TSFE:id
linkWrap.override.if.equals.field = uid
}
wrap = <ul class="menu-level-3">|</ul>
stdWrap.if.value.field = pid
stdWrap.if.equals = 3
}
}
ACT < .NO
ACT {
wrapItemAndSub = <li class="active first">|</li> |*| <li
class="active ">|</li> |*| <li class="active last">|</li>
wrapItemAndSub.override = <li class="active first arrow">|</li>
|*| <li class="active arrow">|</li> |*| <li class="active last
arrow">|</li>
wrapItemAndSub.override.if.value.field = pid
wrapItemAndSub.override.if.equals = 3
}
}
}
temp.MENU_SUB = HMENU
temp.MENU_SUB {
entryLevel = 1
excludeUidList = 54,42,43,171,84,85,86,87
1 = TMENU
1 {
expAll = 1
collapse = 0
wrap = <ul class="menu-level-1">|</ul>
NO = 1
NO {
wrapItemAndSub = <li class="first">|</li> |*| <li>|</li> |*| <li
class="last">|</li>
wrapItemAndSub.override.if.value.field = pid
wrapItemAndSub.override.if.equals = 3
ATagTitle.field = nav_title // title // subtitle
ATagParams = class="active"
ATagParams.if.value.data = GP:category
ATagParams.if.isInList.field = uid
}
ACT < .NO
ACT {
ATagParams >
ATagParams =
ATagParams = class="active"
}
}
}
###############################################
# MENU_BROWSE
###############################################
temp.MENU_CATEGORY-OVERVIEW = COA
temp.MENU_CATEGORY-OVERVIEW {
10 = TEXT
10.value = Zur Übersicht
10.typolink {
parameter.data = GP:category
wrap = <span class="pager-corner-left"></span>|<span
class="pager-corner-right"></span>
ATagBeforeWrap = 1
}
}
temp.MENU_PREVNEXT = HMENU
temp.MENU_PREVNEXT {
special = browse
special {
items = prev|next|INDEX
items.prevnextToSection = 1
#index.target = _blank
index.fields.title = Zur Kategorieübersicht
index.uid.data = GP:category
next.fields.title = Weiter
next.fields.nav_title = Weiter
prev.fields.title = Zurück
prev.fields.nav_title = Zurück
}
1 = TMENU
1.wrap = |
1 {
NO {
additionalParams = &category={GP:category}
additionalParams.insertData = 1
alternativeSortingField = sorting
stdWrap.wrap = <span class="pager-corner-left"></span>|<span
class="pager-corner-right"></span>
}
ACT < .NO
ACT {
ATagParams = class="active"
}
}
}
####################################################
# FOOTER MENU
####################################################
temp.MENU_FOOTER = HMENU
temp.MENU_FOOTER {
entryLevel = 0
1 = TMENU
1 {
expAll = 1
collapse = 0
wrap = <ul class="menu-level-1">|</ul>
NO = 1
NO {
wrapItemAndSub = <li class="first">|</li> |*| <li>|</li> |*| <li
class="last">|</li>
wrapItemAndSub.override.if.value.field = pid
wrapItemAndSub.override.if.equals = 3
ATagTitle.field = nav_title // title // subtitle
ATagParams = class="active"
ATagParams.if.value.data = GP:category
ATagParams.if.isInList.field = uid
}
ACT < .NO
ACT {
ATagParams >
ATagParams =
ATagParams = class="first active" |*| class="active" |*|
class="last active"
}
}
2 < .1
2.NO.wrapItemAndSub = <li class="first">- |</li> |*|
<li>- |</li> |*| <li class="last">- |</li>
2.ACT.wrapItemAndSub = <li class="active first">- |</li> |*|
<li class="active">- |</li> |*| <li class="active last">- |</li>
}
####################################################
# META MENU
####################################################
temp.MENU_META = HMENU
temp.MENU_META {
special = directory
special.value = 11
1 = TMENU
1 {
wrap = |
NO = 1
NO {
wrapItemAndSub = | | |*| | | |*| |
ATagTitle.field = nav_title // title // subtitle
}
ACT < .NO
ACT {
ATagParams = class="active"
}
}
}
##########################################################################
# LANGUAGE MENU
# Siehe auch config & constants TS fuer Spracheinstellungen
##########################################################################
temp.MENU_LANG = HMENU
temp.MENU_LANG {
special = language
# Reihenfolge und Auswahl der Sprachen im Menü
special.value = 0,1
special.normalWhenNoLanguage = 0
wrap = |
1 = TMENU
1 {
noBlur = 1
# Standard Sprachen
NO = 1
NO {
linkWrap = |
# Standard-Titel für den Link wäre Seitenttitel
# => anderer Text als Link-Text (Optionsschift)
stdWrap.override = <img src="fileadmin/_layout/assets/at.png"
alt="Deutsch" /> || <img src="fileadmin/_layout/assets/en.png"
alt="English" />
# Standardmäßige Verlinkung des Menüs ausschalten, da diese
sonstige GET-Parameter nicht enthält
doNotLinkIt = 1
# Link mit aktuellen GET-Parametern neu aufbauen
stdWrap.typolink.parameter.data = page:uid
stdWrap.typolink.additionalParams = &L=0 || &L=1
stdWrap.typolink.addQueryString = 1
stdWrap.typolink.addQueryString.exclude = L,id,cHash,no_cache
stdWrap.typolink.addQueryString.method = GET
stdWrap.typolink.useCacheHash = 1
stdWrap.typolink.no_cache = 0
}
# Aktive Sprache
ACT <.NO
ACT.stdWrap.typolink.ATagParams = class="active"
# NO + Übersetzung nicht vorhanden
USERDEF1 < .NO
# ACT + Übersetzung nicht vorhanden
USERDEF2 < .ACT
}
}
And this is the page-TS (sorry, I had to edit the domain in "canonical
link"...):
############################################################################
# PAGE SETUP
############################################################################
page = PAGE
page.typeNum = 0
page.config.index_enable = 1
############################################################################
# HEADER DATA
############################################################################
# Canonical URL
lib.canonicalTag = TEXT
lib.canonicalTag {
typolink {
parameter.data = TSFE:id
returnLast = url
}
wrap = <link rel='canonical' href='http://www.domain.tld/|' />
}
page.headerData.10 = TEXT
page.headerData.10.value (
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="imagetoolbar" content="no">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="Cache-Control" content="must-revalidate">
)
page.headerData.49900 < lib.canonicalTag
# Title
page.headerData.50000 = TEXT
page.headerData.50000.dataWrap =
<title>{field:title} | {db:sys_template:11:sitetitle}</title>
page.meta {
MSSmartTagsPreventParsing = true
google-site-verification =
description {
field = description
stdWrap.ifEmpty {
cObject = TEXT
cObject.value = {db:sys_template:11:sitetitle}
cObject.insertData = 1
}
}
keywords {
field = keywords
stdWrap.ifEmpty {
cObject = TEXT
cObject.value = {db:sys_template:11:sitetitle}
cObject.insertData = 1
}
}
author {
field = author
stdWrap.ifEmpty {
cObject = TEXT
cObject.value = {db:sys_template:1:sitetitle}
cObject.insertData = 1
}
}
publisher {
field = publisher
stdWrap.ifEmpty {
cObject = TEXT
cObject.value = {db:sys_template:11:sitetitle}
cObject.insertData = 1
}
}
abstract {
field = abstract
stdWrap.ifEmpty {
cObject = TEXT
cObject.value = {db:sys_template:11:sitetitle}
cObject.insertData = 1
}
}
robots = NOODP
#index,follow
language {
field = language
stdWrap.ifEmpty {
cObject = TEXT
cObject.value = de
}
}
revised {
data = page:SYS_LASTCHANGED
strftime = %A, %d.%m.%Y
}
}
# include CSS
[globalVar = GP:L=1]
page.includeCSS.file1 = {$css_menu_en}
[else]
page.includeCSS.file1 = {$css_menu_de}
[GLOBAL]
page.includeCSS.file2 = {$css_main}
[browser = msie] && [version = <9]
page.includeCSS.file20 = {$css_ie_patches_opacity}
[GLOBAL]
[browser = msie] && [version = <8]
page.includeCSS.file21 = {$css_ie_patches}
[GLOBAL]
# include JS
page.includeJS.file1 = {$jquery}
page.includeJS.file2 = {$jquery_tools}
page.includeJS.file3 = {$jquery_ui}
page.includeJS.file6 = {$jquery_cookie}
page.includeJS.file7 = {$jquery_easing}
page.includeJS.file8 = {$jquery_color}
page.includeJS.file10 = {$jquery_carousel}
page.includeJS.file11 = {$jquery_wipe}
page.includeJSFooter.file1 = {$js_own}
############################################################################
# TEMPLATE
############################################################################
page.bodyTag = <body class="use-hover no-js">
page.10 = TEMPLATE
page.10.template = FILE
page.10.template.file = {$template_pages}
[globalVar = TSFE:id=1]
page.10.template.file = {$template_startsite}
[global]
page.10 {
relPathPrefix = {$relPathPrefix}
workOnSubpart = DOCUMENT_BODY
subparts {
SEARCH < temp.searchbox
MENU_MAIN < temp.MENU_MAIN
MENU_SUB < temp.MENU_SUB
SOCIAL_LINKS_FOR_ARTICLE < temp.socialbuttons
CONTENT < styles.content.get
MINI-TEASER-COLLECTION < temp.MINI-TEASER-COLLECTION
MENU_FOOTER < temp.MENU_FOOTER
MENU_LANG < temp.MENU_LANG
FOOTER_ADDRESS < temp.FOOTER_ADDRESS
FOOTER_SOCIAL_LINKS < temp.FOOTER_SOCIAL_LINKS
LOGO_WKO < temp.LOGO_WKO
}
}
# Prev / Next Navigation
[PIDupinRootline = 3] && [treeLevel = 3]
page.10.subparts.MENU_PREVNEXT < temp.MENU_BROWSE
[GLOBAL]
[globalVar = TSFE:id=1]
page.10.subparts.STARTSITE_MAIN < temp.STARTSITE_MAIN
[GLOBAL]
# linke Spalte bei Volltextsuche
[globalVar = TSFE:id=54]
page.10.subparts.CONTENT_LEFT < styles.content.getLeft
[GLOBAL]
[PIDinRootline = 2,4,5,6]
page.10.subparts {
ARTICLE_META_DATA < temp.ARTICLE_META_DATA
LINKS_RELATED < plugin.tx_rwrelatedtopics_pi1
}
[else]
page.10.subparts {
ARTICLE_META_DATA =
LINKS_RELATED =
}
[GLOBAL]
/*
[browser = msie] && [version = <8]
temp.MENU_MAIN.2.NO.after =
temp.MENU_MAIN.2.NO.after >
[globals]
*/
At the moment the IE7-Snippet is deactivated.
I am curious what you are going to say...
Thanks an best regards,
Robert
More information about the TYPO3-team-core
mailing list