From 6e7e805ad86f9b01ec2e149b79a2cb7a938e776c Mon Sep 17 00:00:00 2001 From: "lina.wolf" Date: Sun, 22 Dec 2024 13:18:06 +0100 Subject: [PATCH] [TASK] Remove examples and properties of pure TypoScript language and userfunction menus. Refer to old documetnation instead Releases: main, 13.4 --- .../DataProcessing/MenuProcessor/Index.rst | 11 ++- .../DataProcessing/MenuProcessor/Language.rst | 85 ++----------------- .../MenuProcessor/Userfunction.rst | 26 ++---- .../_LanguageMenuLib.typoscript | 35 -------- 4 files changed, 22 insertions(+), 135 deletions(-) delete mode 100644 Documentation/DataProcessing/MenuProcessor/_code-snippets/_LanguageMenuLib.typoscript diff --git a/Documentation/DataProcessing/MenuProcessor/Index.rst b/Documentation/DataProcessing/MenuProcessor/Index.rst index fde8220c9..9391951f0 100644 --- a/Documentation/DataProcessing/MenuProcessor/Index.rst +++ b/Documentation/DataProcessing/MenuProcessor/Index.rst @@ -173,11 +173,16 @@ Options .. confval:: special :name: MenuProcessor-special :type: *"directory" / "list" / "updated" / "rootline" / "browse" / "keywords" - / "categories" / "language" / "userfunction"* + / "categories" Lets you define special types of menus. - See the section about the :ref:`.special property `! + For backward compatibility reason the special type `language` can be + used with an HMENU. We recommend to use the + `language-menu data processor `_ + to create language menus. + + See the section about the :ref:`.special property `. .. confval:: value :name: MenuProcessor-special-value @@ -185,7 +190,7 @@ Options List of page uid's to use for the special menu. What they are used for depends on the menu type as defined by ".special"; see the - section about the :ref:`.special property `! + section about the :ref:`.special property `. .. _MenuProcessor-titleField: diff --git a/Documentation/DataProcessing/MenuProcessor/Language.rst b/Documentation/DataProcessing/MenuProcessor/Language.rst index d50d4e87c..0e7de4a78 100644 --- a/Documentation/DataProcessing/MenuProcessor/Language.rst +++ b/Documentation/DataProcessing/MenuProcessor/Language.rst @@ -3,83 +3,16 @@ .. index:: HMENU; special = categories .. _hmenu-special-language: -============= -Language menu -============= +========================================================== +Pure TypoScript language menu (For backward compatibility) +========================================================== + +.. attention:: + It is still possible to create a menu with :typoscript:`special = userfunction` + for backward compatibility reasons to be used with HMENU. -.. seealso:: The :ref:`LanguageMenuProcessor ` can be used to create a language menu styled by Fluid. -Creates a language selector menu. - -The :typoscript:`special = language` type will create menu items based on -the current page record but with the language record for each language -overlaid if available. - -.. contents:: - :local: - -.. _hmenu-special-language-properties: - -Properties -========== - -.. confval-menu:: - :display: table - :type: - -.. _hmenu-special-language-value: - -.. confval:: special.value - :name: hmenu-language-special-value - :type: comma separated list of language UIDs /:ref:`stdWrap ` or `auto` - - The number of elements in this list determines the number of menu - items. Setting to `auto` will include all available languages from - the current site. - -.. _hmenu-special-language-normalwhennolanguage: - -.. confval:: special.normalWhenNoLanguage - :name: hmenu-language-special-normalWhenNoLanguage - :type: boolean - - If set, the button for a language will be rendered as a non- - disabled button even if no translation is found for the language. - -.. _hmenu-addquerystring: - -.. confval:: addQueryString - :name: hmenu-addquerystring - :type: :ref:`->addQueryString ` - - **Note:** This works only for *special=language*. - - -.. _hmenu-special-language-examples: - -Example: Create a language menu with pure TypoScript -==================================================== - -.. literalinclude:: _code-snippets/_LanguageMenuLib.typoscript - :caption: EXT:site_package/Configuration/TypoScript/Menus/Setup/LanguageMenuLib.typoscript - -.. seealso:: - For a language menu styled by Fluid see - :ref:`LanguageMenuProcessor `. - -Note on item states -==================== - -When the language of the menu element matches the current language of the page -displayed, the state is set to `ACT`, otherwise `NO`. However, if a page -is not available due to the pages "Localization settings" (which can -disable translations) or if no Alternative Page Language record was -found (can be disabled with `.normalWhenNoLanguage`, see below) the -state is set to `USERDEF1` for non-active items and `USERDEF2` for -active items. So in total there are four states to create designs for. -It is recommended to disable the link on menu items rendered with -`USERDEF1` and `USERDEF2` in this case since they are disabled exactly -because a page in that language does not exist and might even issue an -error if tried accessed (depending on site configuration). +See :ref:`TYPO3 11.5 - Language menu ` for examples +how to use the language menu with the HMENU. diff --git a/Documentation/DataProcessing/MenuProcessor/Userfunction.rst b/Documentation/DataProcessing/MenuProcessor/Userfunction.rst index 83befa48f..b61d87542 100644 --- a/Documentation/DataProcessing/MenuProcessor/Userfunction.rst +++ b/Documentation/DataProcessing/MenuProcessor/Userfunction.rst @@ -4,9 +4,9 @@ .. _hmenu-special-userfunction: .. _hmenu-special-userfunction-examples: -================= -Userfunction menu -================= +============================================ +Userfunction menu (For backward compability) +============================================ .. attention:: It is still possible to create a menu with :typoscript:`special = userfunction` @@ -15,21 +15,5 @@ Userfunction menu However we would advise you to write a :ref:`customized MenuProcessor ` and style the output with Fluid instead. -Calls a user function/method in class which should return an array with -page records for the menu. - -.. contents:: - :local: - -.. _hmenu-special-userfunction-properties: - -Properties -========== - -.. _hmenu-special-userfunction-userfunc: - -.. confval:: special.userFunc - :name: hmenu-userfunction-special-userfunc - :type: string - - Name of the user function +See :ref:`TYPO3 11.5 -Userfunction menu ` +for examples how to use the language menu with the HMENU. diff --git a/Documentation/DataProcessing/MenuProcessor/_code-snippets/_LanguageMenuLib.typoscript b/Documentation/DataProcessing/MenuProcessor/_code-snippets/_LanguageMenuLib.typoscript deleted file mode 100644 index 36cbef931..000000000 --- a/Documentation/DataProcessing/MenuProcessor/_code-snippets/_LanguageMenuLib.typoscript +++ /dev/null @@ -1,35 +0,0 @@ -lib.langMenu = HMENU -lib.langMenu { - special = language - special.value = 0,1,2 - wrap =
    |
- 1 = TMENU - 1 { - NO = 1 - NO { - linkWrap =
  • |
  • - doNotLinkIt = 1 - stdWrap.override = en || de || fr - stdWrap.typolink { - parameter.data = page:uid - additionalParams = &L=0 || &L=1 || &L=2 - addQueryString = 1 - addQueryString.exclude = L,id - - } - } - - // We are in the current language - ACT < .NO - ACT { - linkWrap =
  • |
  • - } - - // No translation available - USERDEF1 < .NO - USERDEF1 { - linkWrap =
  • |
  • - stdWrap.typolink > - } - } -}