Skip to content

Commit

Permalink
[TASK] Remove examples and properties of pure TypoScript language and…
Browse files Browse the repository at this point in the history
… userfunction menus. (#1494)

Refer to old documetnation instead

Releases: main, 13.4

Co-authored-by: lina.wolf <[email protected]>
  • Loading branch information
github-actions[bot] and linawolf authored Dec 27, 2024
1 parent 5cf3d8a commit 81714df
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 135 deletions.
11 changes: 8 additions & 3 deletions Documentation/DataProcessing/MenuProcessor/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -173,19 +173,24 @@ 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 <hmenu-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 <https://docs.typo3.org/permalink/t3tsref:languagemenuprocessor>`_
to create language menus.

See the section about the :ref:`.special property <MenuProcessor-special>`.

.. confval:: value
:name: MenuProcessor-special-value
:type: *list of page-uid's* / :ref:`stdWrap <stdwrap>`

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 <hmenu-special-property>`!
section about the :ref:`.special property <MenuProcessor-special>`.

.. _MenuProcessor-titleField:

Expand Down
85 changes: 9 additions & 76 deletions Documentation/DataProcessing/MenuProcessor/Language.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <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 <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 <typolink-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 <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 <t3tsref/11.5:hmenu-special-language>` for examples
how to use the language menu with the HMENU.
26 changes: 5 additions & 21 deletions Documentation/DataProcessing/MenuProcessor/Userfunction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -15,21 +15,5 @@ Userfunction menu
However we would advise you to write a :ref:`customized MenuProcessor <CustomDataProcessors>`
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 <t3tsref/11.5:hmenu-special-userfunction>`
for examples how to use the language menu with the HMENU.

This file was deleted.

0 comments on commit 81714df

Please sign in to comment.