77Be.infobox ViewHelper `<f:be.infobox> `
88======================================
99
10+ .. figure :: /Images/BeInfoboxWithHTML.png
11+ :alt: A screenshot demonstrating a complex infobox with HTML content
12+
13+ See example `Infobox with HTML content, icon and links <https://docs.typo3.org/permalink/t3viewhelper:typo3-fluid-be-infobox-example-html >`_
14+
1015.. typo3 :viewhelper :: be.infobox
1116 :source: ../../Global.json
12- :display: tags,description,gitHubLink,arguments
17+ :display: tags,description,gitHubLink
18+ :noindex:
19+
20+ .. contents :: Table of contents
1321
1422.. _typo3-fluid-be-infobox-states :
1523
16- States
17- ======
24+ Severity states of the Be.infobox ViewHelper
25+ ============================================
1826
1927The Infobox provides different context-sensitive states that
2028can be used to provide an additional visual feedback to the
@@ -24,27 +32,91 @@ user to underline the meaning of the information.
2432Possible values are in range from ``-2 `` to ``2 ``. Please choose a
2533meaningful value from the following list.
2634
27- ``-2 ``
28- Notices (Default)
29- ``-1 ``
30- Information
31- ``0 ``
32- Positive feedback
33- ``1 ``
34- Warnings
35- ``2 ``
36- Error
35+ .. tabs ::
36+
37+ .. group-tab :: Screenshot
38+
39+ .. figure :: /Images/BeInfobox.png
40+ :alt: A screenshot demonstrating all possible infobox colors and states.
41+
42+ A demonstration of all possible states
43+
44+ .. group-tab :: Numeral values
45+
46+ ``-2 ``
47+ Notices (Default)
48+ ``-1 ``
49+ Information
50+ ``0 ``
51+ Positive feedback
52+ ``1 ``
53+ Warnings
54+ ``2 ``
55+ Error
56+
57+ .. group-tab :: Code example
58+
59+ It is considered best practice to use the states from
60+ :php: `\T YPO3\C MS\F luid\V iewHelpers\B e\I nfoboxViewHelper ` together with the
61+ `Constant ViewHelper <f:constant> <https://docs.typo3.org/permalink/t3viewhelper:typo3fluid-fluid-constant >`_:
62+
63+ .. literalinclude :: _Infobox/_States.html
64+ :caption: EXT:my_extension/Resources/Private/Backend/Templates/MyModule.html
3765
3866.. _typo3-fluid-be-infobox-example :
3967
4068Examples
4169========
4270
43- Simple::
71+ Info box of level notice with a static title and a static text:
72+
73+ .. code-block :: html
74+ :caption: EXT:my_extension/Resources/Private/Backend/Templates/MyModule.html
75+
76+ <f:be .infobox title =" Message title" >your box content</f:be .infobox >
4477
45- <f:be.infobox title="Message title">your box content</f:be.infobox>
78+ Warning box with disabled icon:
4679
47- All options::
80+ .. code-block :: html
81+ :caption: EXT:my_extension/Resources/Private/Backend/Templates/MyModule.html
4882
49- <f:be.infobox title="Message title" message="your box content" state="{f:constant(name: 'TYPO3\CMS\Fluid\ViewHelpers\Be\InfoboxViewHelper::STATE_NOTICE')}" iconName="check" disableIcon="true" />
83+ <f:be .infobox
84+ title =" Message title"
85+ message =" your box content"
86+ state =" {f:constant(name: 'TYPO3\CMS\Fluid\ViewHelpers\Be\InfoboxViewHelper::STATE_WARNING')}"
87+ disableIcon =" true"
88+ />
5089
90+ Success box with custom icon:
91+
92+ .. code-block :: html
93+ :caption: EXT:my_extension/Resources/Private/Backend/Templates/MyModule.html
94+
95+ <f:be .infobox
96+ title =" Message title"
97+ message =" your box content"
98+ state =" {f:constant(name: 'TYPO3\CMS\Fluid\ViewHelpers\Be\InfoboxViewHelper::STATE_OK')}"
99+ iconName =" check"
100+ />
101+
102+
103+ .. _typo3-fluid-be-infobox-example-html :
104+
105+ Infobox with HTML content, icon and links
106+ -----------------------------------------
107+
108+ You can find this example in the TYPO3 backend module
109+ :guilabel: `System > DB Check > Manage Reference Index ` if
110+ :composer: `typo3/cms-lowlevel ` is installed.
111+
112+ .. literalinclude :: _Infobox/_ReferenceIndex.html
113+ :caption: EXT:lowlevel/Resources/Private/Templates/ReferenceIndex.html
114+
115+ .. _typo3-fluid-be-infobox-arguments :
116+
117+ Arguments
118+ =========
119+
120+ .. typo3 :viewhelper :: be.infobox
121+ :source: ../../Global.json
122+ :display: arguments-only
0 commit comments