From fdab203c5caf007c104fe94c570fdbd2d6adb5b8 Mon Sep 17 00:00:00 2001 From: Thor Selander Fjelldalen Date: Mon, 30 Dec 2019 15:24:50 +0100 Subject: [PATCH] Updated table for ezselection_content operator to list-table. This is a more git-/writer-friendly syntax, as only the lines that has changes is changed. --- doc/operators/ezselection_content.rst | 38 ++++++++++++++------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/doc/operators/ezselection_content.rst b/doc/operators/ezselection_content.rst index e039d0a..783c3af 100644 --- a/doc/operators/ezselection_content.rst +++ b/doc/operators/ezselection_content.rst @@ -3,9 +3,9 @@ ezselection_content Summary ~~~~~~~ -Alternative for getting object attribute content from ezselection attribute. The default content always returns an array of values, which only contains id's, whereas this operator returns an array of [ => ]. +Alternative for getting object attribute content from ezselection attribute. The default content always returns an array of values, which only contains id's, whereas this operator returns an array of `[ => ]`. -In the case of single select, returns the name directly. Bypass this to return id-name-array with the named parameter 'with_id_as_key' to true. This parameter is irrelevant for multiselects. +In the case of single select, returns the name directly. Bypass this to return id-name-array with the named parameter `with_id_as_key` to true. This parameter is irrelevant for multiselects. Usage ~~~~~ @@ -13,23 +13,25 @@ Usage field|ezselection_content([true]) - Parameters ~~~~~~~~~~ - =============== =============================================================== ======== ======= - Name Description Required Default - =============== =============================================================== ======== ======= - field eZSelection field from data_map. Do note that we do not pass in Yes - the content, and instead the entire field. - with_id_as_key Whether to include the id of the selection as key. This is No - implicit for multiselect. - =============== =============================================================== ======== ======= +.. list-table:: + :header-rows: 1 + + * - Name + - Description + - Required + - Default -.. csv-table:: - :header: "Name", "Description", "Required", "Default" + * - `field` + - eZSelection field from data_map. Do note that we do not pass in the content, and instead the entire field. + - Yes + - - "field", "eZSelection field from data_map. Do note that we do not pass in the content, and instead the entire field.", "Yes", "" - "with_id_as_key", "Whether to include the id of the selection as key. This is implicit for multiselect.", "No", "" + * - `with_id_as_key` + - Whether to include the id of the selection as key. This is implicit for multiselect. + - No + - Examples ~~~~~~~~ @@ -37,14 +39,14 @@ Examples {$data_map.my_ezselection_single_field|ezselection_content} -Returns name string for selected value: ''. +Returns name string for selected value: `''`. :: {$data_map.my_ezselection_single_field|ezselection_content(true)} -Returns array of the one selected, with identifier as key: array( => ). +Returns array of the one selected, with identifier as key: `array( => )`. :: {$data_map.my_ezselection_multiple_field|ezselection_content} -Returns array of selected values: array( => , [...]). +Returns array of selected values, with identifier as key: `array( => , [...])`.