Project

General

Profile

Actions

Bug #67085

closed

language menu uses incorrect active state

Added by Stefan M. over 9 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
TypoScript
Target version:
-
Start date:
2015-05-21
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

I wanted to create the hreflang tags for a website with 3 different languages: de-DE (default language), de-AT, de-CH.
de-AT and de-CH shall show the complete content of de-DE if there is no translation of the page. So I set hidePagesIfNotTranslatedByDefault to false.

I used this TypoScript:

page.headerData.40 = HMENU
page.headerData.40 {        
  special = language
  special.value = 0,1,2

  1 = TMENU
  1 {
    NO = 1
    NO {
      doNotLinkIt = 1

      stdWrap.cObject = TEXT
      stdWrap.cObject.value = de-DE || de-AT || de-CH

      linkWrap = <link rel="alternate" hreflang="|
      after.cObject = TEXT
      after.cObject {
        stdWrap {
          wrap = " href="|" />
          typolink {
            parameter.data = page:uid
            additionalParams =  &L=0 || &L=1 || &L=2
            returnLast = url
            forceAbsoluteUrl = 1
            addQueryString = 1
          }
        }
      }
    }
    ACT = 1
    ACT.doNotShowLink = 1
  }
}

Now the problem:
If I'm on the e.g. de-CH page without any translation, de-DE is the ACT item.
I checked the language id with GP:L and it is set to 2. So IMHO de-CH should be ACT and not de-DE.

I hope you understand what I mean.

Actions

Also available in: Atom PDF