b13 / menus

TYPO3 Extension for creating fast menus in a fast fashion
GNU General Public License v2.0
54 stars 21 forks source link

no language menu is generated #93

Closed franzholz closed 2 months ago

franzholz commented 1 year ago

I am following the documentation for language menus in TYPO3 11.5.26 with adaption to my marker based site template. However the language menu remains empty. Config.yaml is filled in as required by TYPO3.

<div class="languagemenu"><ul></ul></div>

temp.language = LANGUAGEMENU

temp.language.includeNotInMenu = 1
# add all siteLanguages to menu even if page is not available in language (default 0)
temp.language.addAllSiteLanguages = 1
temp.language.wrap = <ul> | </ul>
temp.language.renderObj.typolink.parameter.data = field:uid
temp.language.renderObj.typolink.additionalParams.data = field:language|languageId
temp.language.renderObj.typolink.additionalParams.intval = 1
temp.language.renderObj.typolink.additionalParams.wrap = &L=|
temp.language.renderObj.data = field:language|title // field:language|twoLetterIsoCode
temp.language.renderObj.wrap = <li class="language-item"> | </li>
temp.language.dataProcessing {
  40 = TYPO3\CMS\Frontend\DataProcessing\LanguageMenuProcessor
  40 {
    languages = <insert language-id> or "auto"
    as = languagenavigation
  }
}

page.10.marks {
    LANGMENU < temp.language
}
sbuerk commented 1 year ago

dataProcessing is a FLUIDTEMPLATE only thing. You are mixing here the dataprocessor into the LANGUAGEMENU content object. That is not documented as such, you are mixing here different things.

# this is not supported by LANGUAGEMENU, that's a FLUIDTEMPLATE only feature
temp.language.dataProcessing {
  40 = TYPO3\CMS\Frontend\DataProcessing\LanguageMenuProcessor
  40 {
    languages = <insert language-id> or "auto"
    as = languagenavigation
  }
}

Not sure if this is correct - not that TypoScript guy and we are using FLUIDTEMPLATES / DataProcessors:

page.10.marks {
  LANGMENU < temp.language
}

Personally forgot a lot about marker based template, cannot get them back into my mind, except that it was a hazzle for dynamic stuff. Maybe it's time to migrate to fluid based templates. So, not sure how to provide the value for a marker dynamically which is then replaced.

Disclaimer: I'm not a maintainer or official of this extension, only consumer of this extension.

franzholz commented 1 year ago

But the extension menus uses its FLUID template. Only the final result (HTML content output) of this extension is written into the marker LANGMENU. menus does not need any knowledge about the site template and it won't fill in any fluid variables of a FLUIDTEMPLATE of the main site template. Therefore I think that I should be able to use it like this.

sbuerk commented 1 year ago

Nope.

b13/menus provides a custom ContentObject LANGUAGEMENU. Additionally, it provides a DataProcessor which can be used to enrich a core FLUIDTEMPLATE contentobject definition.

That must not be the page template. You can define dozen of FLUIDTEMPLATE subtypes, like you can create for e.g. TEXT content ojects in TypoScript.

LANGUAGEMENU ContentObject, fully implemented by this extension does not support DataProcessors. That's a build in Feature of core FLUIDTEMPLATE ContentObject.

You do not have believe me, just check the code for both ContentObject implementation.

You can continue to disagree here, but it won't work.

This extension provides multiple ways of doing things, for all menu types it provides two ways:

So, you can create a language menu in TypoScript either by using LANGUAGEMENU .. or by useing FLUIDTEMPLATE along with the provided DataProzessor, where the markup rending is done as a fluid template instead of TypoScript Wrapping stuff for the content object.

You can then use the choosen technique, tu provide it as marker for a acient TEMPLATE content object definition, which may be your full page marker based template.

So, if you want to use the contentobject rendering style and put it into a marker based template, this should be the way to go:

temp.language = LANGUAGEMENU

temp.language.includeNotInMenu = 1
# add all siteLanguages to menu even if page is not available in language (default 0)
temp.language.addAllSiteLanguages = 1
temp.language.wrap = ul | /ul
temp.language.renderObj.typolink.parameter.data = field:uid
temp.language.renderObj.typolink.additionalParams.data = field:language|languageId
temp.language.renderObj.typolink.additionalParams.intval = 1
temp.language.renderObj.typolink.additionalParams.wrap = &L=|
temp.language.renderObj.data = field:language|title // field:language|twoLetterIsoCode
temp.language.renderObj.wrap = li class="language-item" | /li

# page.10 could be your page template, or just a part.
page.10 = TEMPLATE
page.10.template = TEXT
page.10.template.value (
  <div id="helloWorld">
     ###LANGMENU###
  </div>
)
page.10.marks {
      LANGMENU < temp.language
}

If you want to use the DataProzessor to fill the the rendered menu into your marker based template, it should look more like:

temp.languageMenu = FLUIDTEMPLATE
temp.languageMenu.dataProcessing.10 = B13\Menus\DataProcessing\LanguageMenu
temp.languageMenu.dataProcessing.10.excludeLanguages = de,en
# 0: default, 1 to include nav_hide = 1 pages
temp.languageMenu.dataProcessing.10.includeNotInMenu = 0
# add all siteLanguages to menu even if page is not available in language (default 0)
temp.languageMenu.dataProcessing.10.addAllSiteLanguages = 1
temp.languageMenu.dataProcessing.10.as = languageswitcher
temp.languageMenu.file = EXT:site_default/Resources/Private/Templates/LanguageMenu.html

# page.10 could be your page template, or just a part.
page.10 = TEMPLATE
page.10.template = TEXT
page.10.template.value (
  <div id="helloWorld">
     ###LANGMENU###
  </div>
)
page.10.marks {
      LANGMENU < temp.languageMenu
}

You then have to create a fluid template in EXT:site_default/Resources/Private/Templates/LanguageMenu.html:

<f:debug>{languageswitcher}</f:debug>

Then you can use the provided data in languagesswitcher and generate your HTML markup around it for the entires. That is not done by the DataProcessor.

franzholz commented 1 year ago

temp.languageMenu.file = fileadmin/Resources/Private/Templates/menus/DebugLanguageMenu.html

This proposal works. Now I must change the Fluid template file in order a menu is display instead of the debug info.

franzholz commented 1 year ago

However the variable debug output are not the 4 page languages, but 2 pages with uid=11 which is the current page. The language menu will need more than the pages, doesn't it ? I have now translated the current German page into English, French and Italian. However the debug output remains the same.

<style>
--
  | .extbase-debugger-tree{position:relative}
  | .extbase-debugger-tree input{position:absolute !important;float: none !important;top:0;left:0;height:14px;width:14px;margin:0 !important;cursor:pointer;opacity:0;z-index:2}
  | .extbase-debugger-tree input~.extbase-debug-content{display:none}
  | .extbase-debugger-tree .extbase-debug-header:before{position:relative;top:3px;content:"";padding:0;line-height:10px;height:12px;width:12px;text-align:center;margin:0 3px 0 0;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkViZW5lXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTIgMTIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDEyIDEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj4uc3Qwe2ZpbGw6Izg4ODg4ODt9PC9zdHlsZT48cGF0aCBpZD0iQm9yZGVyIiBjbGFzcz0ic3QwIiBkPSJNMTEsMTFIMFYwaDExVjExeiBNMTAsMUgxdjloOVYxeiIvPjxnIGlkPSJJbm5lciI+PHJlY3QgeD0iMiIgeT0iNSIgY2xhc3M9InN0MCIgd2lkdGg9IjciIGhlaWdodD0iMSIvPjxyZWN0IHg9IjUiIHk9IjIiIGNsYXNzPSJzdDAiIHdpZHRoPSIxIiBoZWlnaHQ9IjciLz48L2c+PC9zdmc+);display:inline-block}
  | .extbase-debugger-tree input:checked~.extbase-debug-content{display:inline}
  | .extbase-debugger-tree input:checked~.extbase-debug-header:before{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkViZW5lXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMTIgMTIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDEyIDEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHN0eWxlIHR5cGU9InRleHQvY3NzIj4uc3Qwe2ZpbGw6Izg4ODg4ODt9PC9zdHlsZT48cGF0aCBpZD0iQm9yZGVyIiBjbGFzcz0ic3QwIiBkPSJNMTEsMTFIMFYwaDExVjExeiBNMTAsMUgxdjloOVYxeiIvPjxnIGlkPSJJbm5lciI+PHJlY3QgeD0iMiIgeT0iNSIgY2xhc3M9InN0MCIgd2lkdGg9IjciIGhlaWdodD0iMSIvPjwvZz48L3N2Zz4=)}
  | .extbase-debugger{display:block;text-align:left;background:#2a2a2a;border:1px solid #2a2a2a;box-shadow:0 3px 0 rgba(0,0,0,.5);color:#000;margin:20px;overflow:hidden;border-radius:4px}
  | .extbase-debugger-floating{position:relative;z-index:99990}
  | .extbase-debugger-top{background:#444;font-size:12px;font-family:monospace;color:#f1f1f1;padding:6px 15px}
  | .extbase-debugger-center{padding:0 15px;margin:15px 0;background-image:repeating-linear-gradient(to bottom,transparent 0,transparent 20px,#252525 20px,#252525 40px)}
  | .extbase-debugger-center,.extbase-debugger-center .extbase-debug-string,.extbase-debugger-center a,.extbase-debugger-center p,.extbase-debugger-center pre,.extbase-debugger-center strong{font-size:12px;font-weight:400;font-family:monospace;line-height:20px;color:#f1f1f1}
  | .extbase-debugger-center pre{background-color:transparent;margin:0;padding:0;border:0;word-wrap:break-word;color:#999}
  | .extbase-debugger-center .extbase-debug-string{color:#ce9178;white-space:normal}
  | .extbase-debugger-center .extbase-debug-type{color:#569CD6;padding-right:4px}
  | .extbase-debugger-center .extbase-debug-unregistered{background-color:#dce1e8}
  | .extbase-debugger-center .extbase-debug-filtered,.extbase-debugger-center .extbase-debug-proxy,.extbase-debugger-center .extbase-debug-ptype,.extbase-debugger-center .extbase-debug-visibility,.extbase-debugger-center .extbase-debug-uninitialized,.extbase-debugger-center .extbase-debug-scope{color:#fff;font-size:10px;line-height:12px;padding:2px 4px;margin-right:2px;position:relative;top:-1px}
  | .extbase-debugger-center .extbase-debug-scope{background-color:#497AA2}
  | .extbase-debugger-center .extbase-debug-ptype{background-color:#698747}
  | .extbase-debugger-center .extbase-debug-visibility{background-color:#6c0787}
  | .extbase-debugger-center .extbase-debug-uninitialized{background-color:#698747}
  | .extbase-debugger-center .extbase-debug-dirty{background-color:#FFFFB6}
  | .extbase-debugger-center .extbase-debug-filtered{background-color:#4F4F4F}
  | .extbase-debugger-center .extbase-debug-seeabove{text-decoration:none;font-style:italic}
  | .extbase-debugger-center .extbase-debug-property{color:#f1f1f1}
  | .extbase-debugger-center .extbase-debug-closure{color:#9BA223;}
  | </style>
  | <div class="extbase-debugger extbase-debugger-floating">
  | <div class="extbase-debugger-top">Extbase Variable Dump</div>
  | <div class="extbase-debugger-center">
  | <pre dir="ltr"><span><span class="extbase-debug-type">array</span>(2 items)</span >
  | <span class="extbase-debug-property">0</span> => <span class="extbase-debugger-tree"><input type="checkbox" /><span class="extbase-debug-header" ><span class="extbase-debug-type">array</span>(83 items)</span ><span class="extbase-debug-content">
  | <span class="extbase-debug-property">uid</span> => 11 (integer)
  | <span class="extbase-debug-property">pid</span> => 2 (integer)
  | <span class="extbase-debug-property">t3ver_oid</span> => 0 (integer)
  | <span class="extbase-debug-property">t3ver_wsid</span> => 0 (integer)
  | <span class="extbase-debug-property">t3ver_state</span> => 0 (integer)
  | <span class="extbase-debug-property">t3ver_stage</span> => 0 (integer)
  | <span class="extbase-debug-property">t3ver_count</span> => 0 (integer)
  | <span class="extbase-debug-property">t3ver_tstamp</span> => 0 (integer)
  | <span class="extbase-debug-property">t3ver_move_id</span> => 0 (integer)
  | <span class="extbase-debug-property">t3_origuid</span> => 0 (integer)
  | <span class="extbase-debug-property">tstamp</span> => 1682527969 (integer)
  | <span class="extbase-debug-property">sorting</span> => 1792 (integer)
  | <span class="extbase-debug-property">deleted</span> => 0 (integer)
  | <span class="extbase-debug-property">perms_userid</span> => 1 (integer)
  | <span class="extbase-debug-property">perms_groupid</span> => 0 (integer)
  | <span class="extbase-debug-property">perms_user</span> => 31 (integer)
  | <span class="extbase-debug-property">perms_group</span> => 27 (integer)
  | <span class="extbase-debug-property">perms_everybody</span> => 0 (integer)
  | <span class="extbase-debug-property">editlock</span> => 0 (integer)
  | <span class="extbase-debug-property">crdate</span> => 1682527544 (integer)
  | <span class="extbase-debug-property">cruser_id</span> => 1 (integer)
  | <span class="extbase-debug-property">hidden</span> => 0 (integer)
  | <span class="extbase-debug-property">title</span> => '<span class="extbase-debug-string">Service</span>' (7 chars)
  | <span class="extbase-debug-property">doktype</span> => 1 (integer)
  | <span class="extbase-debug-property">TSconfig</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">is_siteroot</span> => 0 (integer)
  | <span class="extbase-debug-property">php_tree_stop</span> => 0 (integer)
  | <span class="extbase-debug-property">tx_impexp_origuid</span> => 0 (integer)
  | <span class="extbase-debug-property">url</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">starttime</span> => 0 (integer)
  | <span class="extbase-debug-property">endtime</span> => 0 (integer)
  | <span class="extbase-debug-property">shortcut</span> => 0 (integer)
  | <span class="extbase-debug-property">shortcut_mode</span> => 0 (integer)
  | <span class="extbase-debug-property">fe_group</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">subtitle</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">layout</span> => 0 (integer)
  | <span class="extbase-debug-property">target</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">media</span> => 0 (integer)
  | <span class="extbase-debug-property">lastUpdated</span> => 0 (integer)
  | <span class="extbase-debug-property">keywords</span> => NULL
  | <span class="extbase-debug-property">cache_timeout</span> => 0 (integer)
  | <span class="extbase-debug-property">cache_tags</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">newUntil</span> => 0 (integer)
  | <span class="extbase-debug-property">description</span> => NULL
  | <span class="extbase-debug-property">no_search</span> => 0 (integer)
  | <span class="extbase-debug-property">SYS_LASTCHANGED</span> => 0 (integer)
  | <span class="extbase-debug-property">abstract</span> => NULL
  | <span class="extbase-debug-property">module</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">extendToSubpages</span> => 0 (integer)
  | <span class="extbase-debug-property">author</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">author_email</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">nav_title</span> => '<span class="extbase-debug-string">Service</span>' (7 chars)
  | <span class="extbase-debug-property">nav_hide</span> => 0 (integer)
  | <span class="extbase-debug-property">content_from_pid</span> => 0 (integer)
  | <span class="extbase-debug-property">mount_pid</span> => 0 (integer)
  | <span class="extbase-debug-property">mount_pid_ol</span> => 0 (integer)
  | <span class="extbase-debug-property">l18n_cfg</span> => 0 (integer)
  | <span class="extbase-debug-property">fe_login_mode</span> => 0 (integer)
  | <span class="extbase-debug-property">backend_layout</span> => '<span class="extbase-debug-string">0</span>' (1 chars)
  | <span class="extbase-debug-property">backend_layout_next_level</span> => '<span class="extbase-debug-string">0</span>' (1 chars)
  | <span class="extbase-debug-property">categories</span> => 0 (integer)
  | <span class="extbase-debug-property">tsconfig_includes</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">rowDescription</span> => NULL
  | <span class="extbase-debug-property">sys_language_uid</span> => 2 (integer)
  | <span class="extbase-debug-property">l10n_source</span> => 11 (integer)
  | <span class="extbase-debug-property">l10n_state</span> => '<span class="extbase-debug-string">{&quot;starttime&quot;:&quot;parent&quot;,&quot;endtime&quot;:&quot;parent&quot;,&quot;nav_hide&quot;:&quot;parent&quot;,&quot;url&quot;:&quot;parent&quot;,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;lastUpdated&quot;:&quot;parent&quot;,&quot;newUntil&quot;:&quot;parent&quot;,&quot;no_search&quot;:&quot;parent&quot;,&quot;shortcut&quot;:&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;parent&quot;,&quot;shortcut_mode&quot;:&quot;parent&quot;,&quot;content_from_pid&quot;:&quot;parent&quot;,&quot;author&quot;:&quot;paren<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;t&quot;,&quot;author_email&quot;:&quot;parent&quot;,&quot;media&quot;:&quot;parent&quot;}</span>' (272 chars)
  | <span class="extbase-debug-property">l10n_diffsource</span> => '<span class="extbase-debug-string">{&quot;doktype&quot;:&quot;1&quot;,&quot;slug&quot;:&quot;\/dienste&quot;,&quot;hidden&quot;:&quot;0&quot;,&quot;starttime&quot;:&quot;0&quot;,&quot;endtime&quot;:&quot;0&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;,&quot;l10n_parent&quot;:&quot;0&quot;,&quot;categories&quot;:&quot;0&quot;,&quot;l10n_diffsource&quot;:&quot;&quot;,&quot;layout&quot;:&quot;0&quot;,&quot;lastU<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pdated&quot;:&quot;0&quot;,&quot;newUntil&quot;:&quot;0&quot;,&quot;cache_timeout&quot;:&quot;0&quot;,&quot;shortcut&quot;:&quot;0&quot;,&quot;shortcut_mode<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;:&quot;0&quot;,&quot;content_from_pid&quot;:&quot;0&quot;,&quot;mount_pid&quot;:&quot;0&quot;,&quot;module&quot;:&quot;&quot;,&quot;t3_origuid&quot;:&quot;0&quot;,&quot;s<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ys_language_uid&quot;:&quot;0&quot;,&quot;l10n_source&quot;:&quot;0&quot;,&quot;title&quot;:&quot;Dienste&quot;,&quot;nav_hide&quot;:&quot;0&quot;,&quot;url<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;:&quot;&quot;,&quot;no_search&quot;:&quot;0&quot;,&quot;author&quot;:&quot;&quot;,&quot;author_email&quot;:&quot;&quot;,&quot;media&quot;:&quot;0&quot;,&quot;TSconfig&quot;:&quot;&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;,&quot;php_tree_stop&quot;:&quot;0&quot;,&quot;editlock&quot;:&quot;0&quot;,&quot;fe_group&quot;:&quot;&quot;,&quot;extendToSubpages&quot;:&quot;0&quot;,&quot;ta<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rget&quot;:&quot;&quot;,&quot;cache_tags&quot;:&quot;&quot;,&quot;is_siteroot&quot;:&quot;0&quot;,&quot;mount_pid_ol&quot;:&quot;0&quot;,&quot;fe_login_mode<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;:&quot;0&quot;,&quot;l18n_cfg&quot;:&quot;0&quot;,&quot;backend_layout&quot;:&quot;0&quot;,&quot;backend_layout_next_level&quot;:&quot;0&quot;,&quot;t<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sconfig_includes&quot;:&quot;&quot;,&quot;nav_title&quot;:&quot;&quot;,&quot;subtitle&quot;:&quot;&quot;,&quot;abstract&quot;:&quot;&quot;,&quot;keywords&quot;:&quot;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;,&quot;description&quot;:&quot;&quot;,&quot;rowDescription&quot;:&quot;&quot;}</span>' (799 chars)
  | <span class="extbase-debug-property">slug</span> => '<span class="extbase-debug-string">/service</span>' (8 chars)
  | <span class="extbase-debug-property">legacy_overlay_uid</span> => 0 (integer)
  | <span class="extbase-debug-property">l10n_parent</span> => 11 (integer)
  | <span class="extbase-debug-property">tx_sluggi_lock</span> => 0 (integer)
  | <span class="extbase-debug-property">tx_sluggi_sync</span> => 1 (integer)
  | <span class="extbase-debug-property">tx_slug_locked</span> => 0 (integer)
  | <span class="extbase-debug-property">_PAGES_OVERLAY</span> => TRUE
  | <span class="extbase-debug-property">_PAGES_OVERLAY_UID</span> => 38 (integer)
  | <span class="extbase-debug-property">_PAGES_OVERLAY_LANGUAGE</span> => 2 (integer)
  | <span class="extbase-debug-property">_PAGES_OVERLAY_REQUESTEDLANGUAGE</span> => 2 (integer)
  | <span class="extbase-debug-property">hasSubpages</span> => FALSE
  | <span class="extbase-debug-property">language</span> => <span class="extbase-debugger-tree"><input type="checkbox" /><span class="extbase-debug-header" ><span class="extbase-debug-type">array</span>(17 items)</span ><span class="extbase-debug-content">
  | <span class="extbase-debug-property">title</span> => '<span class="extbase-debug-string">Französisch</span>' (12 chars)
  | <span class="extbase-debug-property">enabled</span> => TRUE
  | <span class="extbase-debug-property">base</span> => '<span class="extbase-debug-string">https://demoshop11.jambage.com/fr/</span>' (34 chars)
  | <span class="extbase-debug-property">typo3Language</span> => '<span class="extbase-debug-string">fr</span>' (2 chars)
  | <span class="extbase-debug-property">locale</span> => '<span class="extbase-debug-string">fr_FR</span>' (5 chars)
  | <span class="extbase-debug-property">iso-639-1</span> => '<span class="extbase-debug-string">fr</span>' (2 chars)
  | <span class="extbase-debug-property">websiteTitle</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">navigationTitle</span> => '<span class="extbase-debug-string">Französisch</span>' (12 chars)
  | <span class="extbase-debug-property">hreflang</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">direction</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">fallbackType</span> => '<span class="extbase-debug-string">strict</span>' (6 chars)
  | <span class="extbase-debug-property">fallbacks</span> => 0 (integer)
  | <span class="extbase-debug-property">flag</span> => '<span class="extbase-debug-string">flags-fr</span>' (8 chars)
  | <span class="extbase-debug-property">languageId</span> => 2 (integer)
  | <span class="extbase-debug-property">twoLetterIsoCode</span> => '<span class="extbase-debug-string">fr</span>' (2 chars)
  | <span class="extbase-debug-property">flagIdentifier</span> => '<span class="extbase-debug-string">flags-fr</span>' (8 chars)
  | <span class="extbase-debug-property">fallbackLanguageIds</span> => <span class="extbase-debugger-tree"><input type="checkbox" /><span class="extbase-debug-header" ><span class="extbase-debug-type">array</span>(1 item)</span ><span class="extbase-debug-content">
  | <span class="extbase-debug-property">0</span> => 0 (integer)</span></span></span></span>
  | <span class="extbase-debug-property">pageIsAvailable</span> => TRUE
  | <span class="extbase-debug-property">isInRootLine</span> => TRUE
  | <span class="extbase-debug-property">isCurrentPage</span> => TRUE
  | <span class="extbase-debug-property">isActiveLanguage</span> => FALSE</span></span>
  | <span class="extbase-debug-property">1</span> => <span class="extbase-debugger-tree"><input type="checkbox" /><span class="extbase-debug-header" ><span class="extbase-debug-type">array</span>(79 items)</span ><span class="extbase-debug-content">
  | <span class="extbase-debug-property">uid</span> => 11 (integer)
  | <span class="extbase-debug-property">pid</span> => 2 (integer)
  | <span class="extbase-debug-property">t3ver_oid</span> => 0 (integer)
  | <span class="extbase-debug-property">t3ver_wsid</span> => 0 (integer)
  | <span class="extbase-debug-property">t3ver_state</span> => 0 (integer)
  | <span class="extbase-debug-property">t3ver_stage</span> => 0 (integer)
  | <span class="extbase-debug-property">t3ver_count</span> => 0 (integer)
  | <span class="extbase-debug-property">t3ver_tstamp</span> => 0 (integer)
  | <span class="extbase-debug-property">t3ver_move_id</span> => 0 (integer)
  | <span class="extbase-debug-property">t3_origuid</span> => 0 (integer)
  | <span class="extbase-debug-property">tstamp</span> => 1398431670 (integer)
  | <span class="extbase-debug-property">sorting</span> => 1792 (integer)
  | <span class="extbase-debug-property">deleted</span> => 0 (integer)
  | <span class="extbase-debug-property">perms_userid</span> => 1 (integer)
  | <span class="extbase-debug-property">perms_groupid</span> => 0 (integer)
  | <span class="extbase-debug-property">perms_user</span> => 31 (integer)
  | <span class="extbase-debug-property">perms_group</span> => 27 (integer)
  | <span class="extbase-debug-property">perms_everybody</span> => 0 (integer)
  | <span class="extbase-debug-property">editlock</span> => 0 (integer)
  | <span class="extbase-debug-property">crdate</span> => 1389729992 (integer)
  | <span class="extbase-debug-property">cruser_id</span> => 1 (integer)
  | <span class="extbase-debug-property">hidden</span> => 0 (integer)
  | <span class="extbase-debug-property">title</span> => '<span class="extbase-debug-string">Dienste</span>' (7 chars)
  | <span class="extbase-debug-property">doktype</span> => 1 (integer)
  | <span class="extbase-debug-property">TSconfig</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">is_siteroot</span> => 0 (integer)
  | <span class="extbase-debug-property">php_tree_stop</span> => 0 (integer)
  | <span class="extbase-debug-property">tx_impexp_origuid</span> => 0 (integer)
  | <span class="extbase-debug-property">url</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">starttime</span> => 0 (integer)
  | <span class="extbase-debug-property">endtime</span> => 0 (integer)
  | <span class="extbase-debug-property">shortcut</span> => 0 (integer)
  | <span class="extbase-debug-property">shortcut_mode</span> => 0 (integer)
  | <span class="extbase-debug-property">fe_group</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">subtitle</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">layout</span> => 0 (integer)
  | <span class="extbase-debug-property">target</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">media</span> => 0 (integer)
  | <span class="extbase-debug-property">lastUpdated</span> => 0 (integer)
  | <span class="extbase-debug-property">keywords</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">cache_timeout</span> => 0 (integer)
  | <span class="extbase-debug-property">cache_tags</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">newUntil</span> => 0 (integer)
  | <span class="extbase-debug-property">description</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">no_search</span> => 0 (integer)
  | <span class="extbase-debug-property">SYS_LASTCHANGED</span> => 1567020836 (integer)
  | <span class="extbase-debug-property">abstract</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">module</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">extendToSubpages</span> => 0 (integer)
  | <span class="extbase-debug-property">author</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">author_email</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">nav_title</span> => '<span class="extbase-debug-string">Dienste</span>' (7 chars)
  | <span class="extbase-debug-property">nav_hide</span> => 0 (integer)
  | <span class="extbase-debug-property">content_from_pid</span> => 0 (integer)
  | <span class="extbase-debug-property">mount_pid</span> => 0 (integer)
  | <span class="extbase-debug-property">mount_pid_ol</span> => 0 (integer)
  | <span class="extbase-debug-property">l18n_cfg</span> => 0 (integer)
  | <span class="extbase-debug-property">fe_login_mode</span> => 0 (integer)
  | <span class="extbase-debug-property">backend_layout</span> => '<span class="extbase-debug-string">0</span>' (1 chars)
  | <span class="extbase-debug-property">backend_layout_next_level</span> => '<span class="extbase-debug-string">0</span>' (1 chars)
  | <span class="extbase-debug-property">categories</span> => 0 (integer)
  | <span class="extbase-debug-property">tsconfig_includes</span> => NULL
  | <span class="extbase-debug-property">rowDescription</span> => NULL
  | <span class="extbase-debug-property">sys_language_uid</span> => 0 (integer)
  | <span class="extbase-debug-property">l10n_source</span> => 0 (integer)
  | <span class="extbase-debug-property">l10n_state</span> => NULL
  | <span class="extbase-debug-property">l10n_diffsource</span> => NULL
  | <span class="extbase-debug-property">slug</span> => '<span class="extbase-debug-string">/dienste</span>' (8 chars)
  | <span class="extbase-debug-property">legacy_overlay_uid</span> => 0 (integer)
  | <span class="extbase-debug-property">l10n_parent</span> => 0 (integer)
  | <span class="extbase-debug-property">tx_sluggi_lock</span> => 0 (integer)
  | <span class="extbase-debug-property">tx_sluggi_sync</span> => 1 (integer)
  | <span class="extbase-debug-property">tx_slug_locked</span> => 0 (integer)
  | <span class="extbase-debug-property">hasSubpages</span> => FALSE
  | <span class="extbase-debug-property">language</span> => <span class="extbase-debugger-tree"><input type="checkbox" /><span class="extbase-debug-header" ><span class="extbase-debug-type">array</span>(17 items)</span ><span class="extbase-debug-content">
  | <span class="extbase-debug-property">title</span> => '<span class="extbase-debug-string">Italienisch</span>' (11 chars)
  | <span class="extbase-debug-property">enabled</span> => TRUE
  | <span class="extbase-debug-property">base</span> => '<span class="extbase-debug-string">https://demoshop11.jambage.com/it/</span>' (34 chars)
  | <span class="extbase-debug-property">typo3Language</span> => '<span class="extbase-debug-string">it</span>' (2 chars)
  | <span class="extbase-debug-property">locale</span> => '<span class="extbase-debug-string">it_IT</span>' (5 chars)
  | <span class="extbase-debug-property">iso-639-1</span> => '<span class="extbase-debug-string">it</span>' (2 chars)
  | <span class="extbase-debug-property">websiteTitle</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">navigationTitle</span> => '<span class="extbase-debug-string">Italienisch</span>' (11 chars)
  | <span class="extbase-debug-property">hreflang</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">direction</span> => '<span class="extbase-debug-string"></span>' (0 chars)
  | <span class="extbase-debug-property">fallbackType</span> => '<span class="extbase-debug-string">strict</span>' (6 chars)
  | <span class="extbase-debug-property">fallbacks</span> => 0 (integer)
  | <span class="extbase-debug-property">flag</span> => '<span class="extbase-debug-string">flags-it</span>' (8 chars)
  | <span class="extbase-debug-property">languageId</span> => 3 (integer)
  | <span class="extbase-debug-property">twoLetterIsoCode</span> => '<span class="extbase-debug-string">it</span>' (2 chars)
  | <span class="extbase-debug-property">flagIdentifier</span> => '<span class="extbase-debug-string">flags-it</span>' (8 chars)
  | <span class="extbase-debug-property">fallbackLanguageIds</span> => <span class="extbase-debugger-tree"><input type="checkbox" /><span class="extbase-debug-header" ><span class="extbase-debug-type">array</span>(1 item)</span ><span class="extbase-debug-content">
  | <span class="extbase-debug-property">0</span> => 0 (integer)</span></span></span></span>
  | <span class="extbase-debug-property">pageIsAvailable</span> => TRUE
  | <span class="extbase-debug-property">isInRootLine</span> => TRUE
  | <span class="extbase-debug-property">isCurrentPage</span> => TRUE
  | <span class="extbase-debug-property">isActiveLanguage</span> => FALSE</span></span></pre>
  | </div>
  | </div>
  |  
sbuerk commented 1 year ago

@franzholz Please, read the README.md there are quite some examples. The full markup copy&paste is not helpfull, I'm not going to extract valuable informations from it.

From the README.md LanguageMenu FLUID Example:

<nav>
  <f:for each="{languageswitcher}" as="item">
    <f:link.page 
      pageUid="{item.uid}"
      language="{item.language.languageId}"
    >{item.language.title}</f:link.page>
  </f:for>
</nav>

{languageswitcher} should be the name you selected as .as for the DataProcessor configuration for the FLUIDTEMPLATE:

temp.languageMenu.dataProcessing.10.as = languageswitcher

Change it in the fluid template to the name you have choosen. Don't forget to clear (all) caches.

Additionally, play around with the configuraiton option for the menu and so on.

Unrelated, but importent side-note:

Do not use fileadmin/ for any kind of templates. Create a sitepackage extension, and provide it there. Providing templates in fileadmin is discouraged and bad practices since quite some major core versions (pre v6).

Marker based templates are basically supported for now, but it's recommended to move to fluidtemplates for quite some reasons. Maybe time to reconsider and move to new things (which are not new anymore since years).

Example / Options for DataProcessor

Beside this, have you read the example TypoScript definition, which I provided above in a earlier comment ?

# excluded languages
page.10.dataProcessing.10.excludeLanguages = de,en

# 0: default, 1 to include nav_hide = 1 pages
page.10.dataProcessing.10.includeNotInMenu = 0

# add all siteLanguages to menu even if page is not available in language (default 0)
page.10.dataProcessing.10.addAllSiteLanguages = 1

If you have copy&pasted it without reading, you maybe have missed the "excludedLanguaes" configuration which ignores "de" and "en". That would explain why from 4 languages 2 are missing.

Technically, the "default" language is the base record (uid), if you look through the array, there are some additionel system elements (_PAGES_OVERLAY* and others) which should differ. Anyway with the now "provided" fluid markup, should see more. It's a simpleone. With the containted data you can add custom css classes per state (current, other languages) etc and decide if you want to link or not and so on. But that's up to you then.

Check the three options above and adjust them to your needs.

franzholz commented 1 year ago

Thanks for this great help. This should come into the docs. Now I had to remove de and en from the excludeLanguages and all 4 languages are shown in a linked text list. Originally I wanted to have them in a select box with 4 options. But I can try this out later.

Yes, I have already understood that in the next version I must change all the template setup into a sitepackage for the website.

sbuerk commented 1 year ago

Everything I gave you is from the README.md. So it is documented.

ervaude commented 1 year ago

Can we close this issue or is there something left to be done?