Skip to content

Commit

Permalink
[TASK] Add documentation for the new features
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Futterlieb committed Jun 7, 2018
1 parent 575656f commit 1e360cf
Show file tree
Hide file tree
Showing 5 changed files with 176 additions and 5 deletions.
151 changes: 150 additions & 1 deletion Documentation/Configuration/TSConfig/Index.rst
Expand Up @@ -11,7 +11,10 @@ module. You can set it for backend users, backend groups or pages.

The options are defined in ``mod.fe_cookies``.

.. _section-configuration-tsconfig- settingsmanagement:
.. contents:: Table of Contents
:local:

.. _section-configuration-tsconfig-settingsmanagement:

Settings management
-------------------
Expand Down Expand Up @@ -107,3 +110,149 @@ The following options are defined in
0 = enableCloseButton
1 = styles.*
}
.. _section-configuration-tsconfig-languagemanagement:

Language management
-------------------

The language management allows backend users to edit the language labels
that are used in the frontend plugin. To achieve this, the module stores
the userdefined labels in dynamically generated xml files (xliff format)
which are located in
``typo3conf/tx_fecookies/UserdefinedLanguageLabels``.

Currently available labels:

* ``plugin.label.button.accept``
* ``plugin.label.button.close``
* ``plugin.label.aria.banner``

The following options are defined in
``mod.fe_cookies.languageManagement``.

.. container:: table-row

Option
enable

Data type
bool

Description
If this option evaluates to true for a backend user, the
language management in the backend module will become available.
Admin users are always allowed.

.. important::

If you enable language management in the backend module, be
sure to correctly set the options `defaultLanguageIsocode``
and/or ``storageMode`` **before** using the module.

This option is likely to be used in backend user (group)
TSConfig.

**Default value:** ``0``

.. container:: table-row

Option
storageMode

Data type
string

Description
This option defines, how the xml files are stored in the
filesystem. By default (``global``), all files stay in the
predefined location (
``typo3conf/tx_fecookies/UserdefinedLanguageLabels``).

If you have a TYPO3 installation that manages multiple websites
and you must be able to set different labels in different
pages/rootlines, you can change this option to ``page:<UID>``.
Where ``<UID>`` is the actual uid of the page under which the
labels should be accessible. In this case, the xml files are
stored in
``typo3conf/tx_fecookies/UserdefinedLanguageLabels/page_<UID>``.

Like this, the frontend plugin will be able to look up the
rootline, until it finds a folder with language files. If
nothing is found, the global location will be tried. If still
no result is available, the default files shipped with fe_cookies
itself (
``EXT:fe_cookies/Resources/Private/Language/userdefinedLabels.xlf``
)
will be used.

.. tip::

To override the extension-defaults, you can use "Custom
translations", see the
:ref:`TYPO3 Core API <t3coreapi:xliff-translating-custom>`
documentation for reference.

This option is likely to be used in page TSConfig.

**Default value:** ``global``

.. container:: table-row

Option
defaultLanguageIsocode

Data type
string

Description
Use this option, when you have a language other than english as
your default website language.

.. tip::

You might want to configure your default language like this
(for german):

.. code-block:: typoscript
mod.SHARED {
defaultLanguageFlag = de
defaultLanguageLabel = Deutsch
}
mod.fe_cookies.languageManagement.defaultLanguageIsocode = de
This option is likely to be used in page TSConfig.

**Default value:** ``default``

.. container:: table-row

Option
allowedLanguageLabels

Data type
string/list

Description
With this option, you can define, which language labels can be
edited in the backend module. It is a string with comma-separated
labels. See above for the currently available labels.

Examples:

.. code-block:: typoscript
// Allow everything (from default), except the aria-label
mod.fe_cookies.languageManagement {
allowedLanguageLabels := removeFromList(plugin.label.aria.banner)
}
// Allow only the accept-button label
mod.fe_cookies.languageManagement {
allowedLanguageLabels = plugin.label.button.accept
}
This option is likely to be used in page TSConfig.

**Default value:** ``plugin.label.button.accept, plugin.label.button.close, plugin.label.aria.banner``
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Documentation/Images/UserManual/BackendModuleOverview.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions Documentation/Settings.cfg
Expand Up @@ -52,7 +52,7 @@ use_opensearch = https://docs.typo3.org/typo3cms/extensions/fe_cookies

# t3api = https://typo3.org/api/typo3cms/
# t3cgl = https://docs.typo3.org/typo3cms/CodingGuidelinesReference/
# t3coreapi = https://docs.typo3.org/typo3cms/CoreApiReference/
t3coreapi = https://docs.typo3.org/typo3cms/CoreApiReference/
# t3editors = https://docs.typo3.org/typo3cms/EditorsTutorial/
# t3extbasebook = https://docs.typo3.org/typo3cms/ExtbaseFluidBook/
# t3fal = https://docs.typo3.org/typo3cms/FileAbstractionLayerReference/
Expand All @@ -67,7 +67,7 @@ use_opensearch = https://docs.typo3.org/typo3cms/extensions/fe_cookies
# t3templating = https://docs.typo3.org/typo3cms/TemplatingTutorial/
# t3ts45 = https://docs.typo3.org/typo3cms/TyposcriptIn45MinutesTutorial/
# t3tsconfig = https://docs.typo3.org/typo3cms/TSconfigReference/
t3tsref = https://docs.typo3.org/typo3cms/TyposcriptReference/
t3tsref = https://docs.typo3.org/typo3cms/TyposcriptReference/
# t3tssyntax = https://docs.typo3.org/typo3cms/TyposcriptSyntaxReference/


Expand Down
26 changes: 24 additions & 2 deletions Documentation/User/Index.rst
Expand Up @@ -58,8 +58,9 @@ Edit settings

If you have the permission to do so, you can open the settings for the
frontend plugin. It can be accessed through the link inside the
"toolbar", which is located right above the content-editing area. If you
cannot see this link, you are not allowed to edit the settings.
"toolbar", which is located right above the content-editing area (see the
**green mark** in the :ref:`picture above <section-user-backendmodule>`).
If you cannot see the link, you are not allowed to edit the settings.


.. figure:: ../Images/UserManual/BackendModuleSettings.png
Expand All @@ -73,3 +74,24 @@ cannot see this link, you are not allowed to edit the settings.
picture. The options you're allowed to edit are defined by your
integrator.

Edit language labels
--------------------

If you have the permission to do so, you can open the management of the
language labels, which will be used in the frontend plugin. It can be
accessed through the link inside the "toolbar", which is located right
above the content-editing area (see **orange mark** in the
:ref:`picture above <section-user-backendmodule>`). If you cannot see
the button, you are not allowed to edit the language labels.


.. figure:: ../Images/UserManual/BackendModuleLanguages.png
:alt: Language labels management overview

Language labels management overview

.. tip::

It is very likely, that you don't see the same languages as in the
picture. The languages you're allowed to edit are defined by your
integrator (and by the requirements of your website as well).

0 comments on commit 1e360cf

Please sign in to comment.