[TYPO3-english] sr_language_menu: active alternative page languages also render class="INACT"

Adriaan Van den Bruinhorst adriaanbr at gmail.com
Mon Dec 30 18:47:27 CET 2013


Hello,

Recently I installed the extension sr_language_menu to manage my languages.
Unfortunately, active alternative page languages still render the
class"INACT" in their links where class="NO" is expected.

I covered the dependencies and applied the following (relevant) constants
and setup:

Constants:
plugin.tx_srlanguagemenu.defaultLanguageISOCode = nl
plugin.tx_srlanguagemenu.defaultCountryISOCode = nl
plugin.tx_srlanguagemenu.doNotLinkInactive = 0
plugin.tx_srlanguagemenu.doNotLinkCurrent = 1

Setup:
# ---------------- Set language  BEGIN ---------------#
config {
   linkVars = L
   sys_language_mode = content_fallback
   sys_language_uid = 0
   language = nl
}

# Default Dutch
[globalVar = GP:L = 0]
     config.sys_language_uid = 0
     config.language = nl
[global]

# English
[globalVar = GP:L = 2]
     config.sys_language_uid = 2
     config.language = en
[global]

# German
[globalVar = GP:L = 3]
     config.sys_language_uid = 3
     config.language = de
[global]

# Italian
[globalVar = GP:L = 4]
     config.sys_language_uid = 4
     config.language = it
[global]

# ---------------- Set language  END ---------------#

 I use the default flags captured in divs and links. I wanted to have
links, even if the page does not have a translation, to translate all the
menus and still have the opportunity to navigate in the selected language
(doNotLinkInactive = 0). When I applied different CSS to the class INACT
and NO I realised the discrepancy.

An example of the link structure for the languages Dutch (default),
English, German and Italian where the current page is displayed in German,
an English translation exists and an Italian translation does not:

<div class="tx-srlanguagemenu tx-srlanguagemenu-flags">
    <div class="NO">
        <a class="flag" href="index.php?id=82&amp;L=0"><img
src="typo3conf/ext/sr_language_menu/Resources/Public/Images/Flags/nl.png"
title="Dutch" alt="Dutch" class="tx-srlanguagemenu-flag-linked" /></a>
    </div>
    <div class="CUR SPC">
        <img
src="typo3conf/ext/sr_language_menu/Resources/Public/Images/Flags/de.png"
title="Diese Seite nicht vorhanden auf Deutsch" alt="German"
class="tx-srlanguagemenu-flag-unlinked" />
    </div>
    <div class="INACT SPC">
        <a class="flag" href="index.php?id=82&amp;L=2"><img
src="typo3conf/ext/sr_language_menu/Resources/Public/Images/Flags/en.png"
title="English" alt="English" class="tx-srlanguagemenu-flag-linked" /></a>
    </div>

    <div class="INACT SPC">
        <a class="flag" href="index.php?id=82&amp;L=4"><img
src="typo3conf/ext/sr_language_menu/Resources/Public/Images/Flags/it.png"
title="Italian" alt="Italian" class="tx-srlanguagemenu-flag-linked" /></a>
    </div>
</div>

I hope someone can help me, as I'm not such a good php programmer. I can
really not see if or what is going wrong in the MenuController.php file.

This is the first time I use the mailinglist, so please, if I do something
wrong, tell me!

Best,

Adriaan

----------------------------------------------------------------------------------------------------
TYPO3: version 6.1.1
ext. sr_language_menu:  version 6.0.2
ext. static_info_tables: 6.0.5
System: Wampserver (PHP 5.3.13, MySQL 5.524, Windows 7 64 bit)
----------------------------------------------------------------------------------------------------


More information about the TYPO3-english mailing list