From d7c51827d30346cb2622375175ba63da17769c01 Mon Sep 17 00:00:00 2001 From: Lina Wolf <48202465+linawolf@users.noreply.github.com> Date: Sun, 14 Apr 2024 19:05:52 +0200 Subject: [PATCH] [TASK] Switch to confvals for mod.web_view (#465) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [TASK] Switch to confvals for mod.web_view * use confvals * correct indentation * Give headers to examples releases: main, 12.4, 11.5 * Update Documentation/PageTsconfig/Mod/WebView.rst Co-authored-by: Chris Müller <2566282+brotkrueml@users.noreply.github.com> * Update Documentation/PageTsconfig/Mod/WebView.rst Co-authored-by: Chris Müller <2566282+brotkrueml@users.noreply.github.com> --------- Co-authored-by: Chris Müller <2566282+brotkrueml@users.noreply.github.com> --- Documentation/PageTsconfig/Mod/WebView.rst | 105 +++++++++++---------- 1 file changed, 54 insertions(+), 51 deletions(-) diff --git a/Documentation/PageTsconfig/Mod/WebView.rst b/Documentation/PageTsconfig/Mod/WebView.rst index 57bb1b5a..a36ae329 100644 --- a/Documentation/PageTsconfig/Mod/WebView.rst +++ b/Documentation/PageTsconfig/Mod/WebView.rst @@ -1,9 +1,9 @@ -.. include:: /Includes.rst.txt +.. include:: /Includes.rst.txt -.. index:: - mod; web_view - Modules; View -.. _pagewebview: +.. index:: + mod; web_view + Modules; View +.. _pagewebview: ======== web_view @@ -11,74 +11,77 @@ web_view Configuration options of the "Web > View" module. -.. contents:: - :local: +.. contents:: + :local: -.. index:: - previewFrameWidths - Preview; Frame widths - Preview; Tablet - Preview; Mobile +.. index:: + previewFrameWidths + Preview; Frame widths + Preview; Tablet + Preview; Mobile previewFrameWidths ================== -:aspect:`Datatype` - array +.. confval:: previewFrameWidths + :name: mod-web-view-previewFrameWidths + :type: array -:aspect:`Description` - Configure available presets in view module. + Configure available presets in view module. - .label - Label for the preset + .label + Label for the preset - .type - Category of the preset, must be one of 'desktop', 'tablet' or 'mobile' + .type + Category of the preset, must be one of 'desktop', 'tablet' or 'mobile' - .width - Width of the preset + .width + Width of the preset - .height - Height of the preset + .height + Height of the preset -:aspect:`Example` - With this configuration a new preset '1014' with size 1027x768 will be configured with a label - loaded from an xlf file and the category 'desktop'. +Example: Define a new preview preset +------------------------------------ - .. code-block:: typoscript - :caption: EXT:site_package/Configuration/page.tsconfig +With this configuration a new preset '1014' with size 1024x768 will be configured with a label +loaded from an xlf file and the category 'desktop'. - mod.web_view.previewFrameWidths { - 1024.label = LLL:EXT:viewpage/Resources/Private/Language/locallang.xlf:computer - 1024.type = desktop - 1024.width = 1024 - 1024.height = 768 - } +.. code-block:: typoscript + :caption: EXT:site_package/Configuration/page.tsconfig - .. figure:: /Images/ManualScreenshots/View/WebViewTSConfigPreview.png - :alt: Dropdown menu Width with added frame size called myPreview + mod.web_view.previewFrameWidths { + 1024.label = LLL:EXT:viewpage/Resources/Private/Language/locallang.xlf:computer + 1024.type = desktop + 1024.width = 1024 + 1024.height = 768 + } - Dropdown menu Width with added frame size called myPreview +.. figure:: /Images/ManualScreenshots/View/WebViewTSConfigPreview.png + :alt: Dropdown menu Width with added frame size called myPreview + Dropdown menu Width with added frame size called myPreview -.. index:: - View module; type parameter +.. index:: + View module; type parameter type ==== -:aspect:`Datatype` - positive integer +.. confval:: type + :name: mod-web-view-type + :type: positive integer -:aspect:`Description` - Enter the value of the &type parameter passed to the webpage. + Enter the value of the `&type=` parameter passed to the webpage. -:aspect:`Example` - .. code-block:: typoscript - :caption: EXT:site_package/Configuration/page.tsconfig +Example: Show pages of type 42 in the preview +--------------------------------------------- - mod.web_view { - # Frontend link will be something like index.php?id=123&type=1 - type = 1 - } +.. code-block:: typoscript + :caption: EXT:site_package/Configuration/page.tsconfig + + mod.web_view { + # Frontend link will be something like index.php?id=123&type=42 + type = 42 + }