Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Remove examples and properties of pure TypoScript language and… #1487

Merged
merged 1 commit into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading