Skip to content

Commit

Permalink
[TASK] Switch to confvals for mod.web_view
Browse files Browse the repository at this point in the history
* use confvals
* correct indentation
* Give headers to examples

releases: main, 12.4, 11.5
  • Loading branch information
linawolf committed Apr 14, 2024
1 parent ac9749f commit 79fa8c7
Showing 1 changed file with 54 additions and 51 deletions.
105 changes: 54 additions & 51 deletions Documentation/PageTsconfig/Mod/WebView.rst
Original file line number Diff line number Diff line change
@@ -1,84 +1,87 @@
.. include:: /Includes.rst.txt
.. include:: /Includes.rst.txt

.. index::
mod; web_view
Modules; View
.. _pagewebview:
.. index::
mod; web_view
Modules; View
.. _pagewebview:

========
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.

<key>.label
Label for the preset
<key>.label
Label for the preset

<key>.type
Category of the preset, must be one of 'desktop', 'tablet' or 'mobile'
<key>.type
Category of the preset, must be one of 'desktop', 'tablet' or 'mobile'

<key>.width
Width of the preset
<key>.width
Width of the preset

<key>.height
Height of the preset
<key>.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 1027x768 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=1
type = 42
}

0 comments on commit 79fa8c7

Please sign in to comment.