{"id":4618,"date":"2023-01-13T09:55:48","date_gmt":"2023-01-13T09:55:48","guid":{"rendered":"https:\/\/info.documotor.com\/?page_id=4618"},"modified":"2023-04-20T11:01:45","modified_gmt":"2023-04-20T11:01:45","slug":"section-bindings","status":"publish","type":"page","link":"https:\/\/info.documotor.com\/?page_id=4618","title":{"rendered":"Section Bindings"},"content":{"rendered":"\n<div class=\"wp-block-image is-style-default\"><figure class=\"alignright size-full\"><img loading=\"lazy\" width=\"279\" height=\"597\" src=\"https:\/\/info.documotor.com\/wp-content\/uploads\/2023\/01\/image-30.png\" alt=\"\" class=\"wp-image-4724\" srcset=\"https:\/\/info.documotor.com\/wp-content\/uploads\/2023\/01\/image-30.png 279w, https:\/\/info.documotor.com\/wp-content\/uploads\/2023\/01\/image-30-140x300.png 140w\" sizes=\"(max-width: 279px) 100vw, 279px\" \/><\/figure><\/div>\n\n\n\n<p>Section bindings are placed in the name of a section and have a parameter that replaces the binding in the generated template.<\/p>\n\n\n\n<p>Using section bindings enables, among other things, repeating slides or controlling the visibility of slides in the presentation. <\/p>\n\n\n\n<p>This sub-section contains articles describing the respective section binding types.<\/p>\n\n\n\n<h3>Binding syntax<\/h3>\n\n\n\n<p>Section bindings can be defined for single slides  with a closed binding tag and for multiple slides with open tags, which is called nested bindings. <\/p>\n\n\n\n<p>A single section binding, with closed tags, looks like following (also see example to the left):<\/p>\n\n\n\n<p><code>&lt;&lt;BindingType:Parameters&gt;&gt;<\/code><\/p>\n\n\n\n<p>and a nested section binding, with open tags, looks like this:<\/p>\n\n\n\n<p><code>&lt;&lt;BindingType:Path&gt;...&lt;BindingType&gt;&gt;<\/code><\/p>\n\n\n\n<p>Below example shows two nested sections, <code>&lt;&lt;Repeat:properties>...&lt;Repeat>><\/code> and <code>&lt;&lt;Repeat:floors>&lt;Repeat>><\/code>. This example has an nested section with the path <code>properties<\/code> which has another nested section inside with the path <code>floors<\/code>. This section has three single bindings inside, two <code>Visible<\/code> and one normal <code>Repeat<\/code>. The two nested <code>Repeat<\/code> bindings are closed with the <code>&lt;Repeat>><\/code> closing tags in the end. Note that there has be a section inside the nested repeater, for repeating. E.g. &#8220;Properties&#8221; and &#8220;Floors&#8221; like in the example below. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" width=\"363\" height=\"344\" src=\"https:\/\/info.documotor.com\/wp-content\/uploads\/2023\/03\/image-21.png\" alt=\"\" class=\"wp-image-5337\" srcset=\"https:\/\/info.documotor.com\/wp-content\/uploads\/2023\/03\/image-21.png 363w, https:\/\/info.documotor.com\/wp-content\/uploads\/2023\/03\/image-21-300x284.png 300w\" sizes=\"(max-width: 363px) 100vw, 363px\" \/><\/figure>\n\n\n\n<p><strong>Note <\/strong>that currently the only binding type supported for nested sections is <a href=\"https:\/\/info.documotor.com\/?page_id=648\" data-type=\"page\" data-id=\"648\">Repeat<\/a>.<\/p>\n\n\n\n<p>The data for nested sections also needs to be nested. An example to match above screenshot could look like this:<\/p>\n\n\n\n<pre title=\"Result\" class=\"wp-block-code\"><code lang=\"json\" class=\"language-json line-numbers\">{\n    \"properties\": [\n        \/\/nested level #1 - &lt;&lt;Repeat:properties&gt;...&lt;Repeat&gt;&gt;\n        { \n            \"propertyName\": \"House of Meadows\",\n            \"floors\": [\n                \/\/nested level #2 - &lt;&lt;Repeat:floors&gt;...&lt;Repeat&gt;&gt;\n                {\n                    \"floorName\": \"HoM Level A\",\n                    \"cardAccess\": false,\n                    \"petsAllowed\": true,\n                    \"suites\": [\n                        {\n                            \"suiteName\": \"HoM Level A Suite 1\",\n                            \"suiteStandard\": \"A1\"\n                        },\n                        {\n                            \"suiteName\": \"HoM Level A Suite 2\",\n                            \"suiteStandard\": \"A2\"\n                        }\n                    ]\n                },\n                {\n                    \"floorName\": \"HoM Level B\",\n                    \"cardAccess\": false,\n                    \"petsAllowed\": true,\n                    \"suites\": [\n                        {\n                            \"suiteName\": \"HoM Level B Suite 1\",\n                            \"suiteStandard\": \"B1\"\n                        },\n                        {\n                            \"suiteName\": \"HoM Level B Suite 2\",\n                            \"suiteStandard\": \"B2\"\n                        }\n                    ]\n                }\n            ]\n        },\n        {\n            \"propertyName\": \"House of Cards\",\n            \"floors\": [\n                \/\/nested level #2 - &lt;&lt;Repeat:floors&gt;...&lt;Repeat&gt;&gt;\n                {\n                    \"floorName\": \"HoC Level A\",\n                    \"cardAccess\": true,\n                    \"petsAllowed\": false,\n                    \"suites\": [\n                        {\n                            \"suiteName\": \"HoC Level A Suite 1\",\n                            \"suiteStandard\": \"A1\"\n                        },\n                        {\n                            \"suiteName\": \"HoC Level D Suite 2\",\n                            \"suiteStandard\": \"A2\"\n                        }\n                    ]\n                },\n                {\n                    \"floorName\": \"HoC Level B\",\n                    \"cardAccess\": true,\n                    \"petsAllowed\": false,\n                    \"suites\": [\n                        {\n                            \"suiteName\": \"HoC Level B Suite 1\",\n                            \"suiteStandard\": \"B1\"\n                        },\n                        {\n                            \"suiteName\": \"HoC Level B Suite 2\",\n                            \"suiteStandard\": \"B2\"\n                        }\n                    ]\n                }\n            ]\n        }\n    ]\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Section bindings are placed in the name of a section and have a parameter that replaces the binding in the generated template. Using section bindings enables, among other things, repeating slides or controlling the visibility of slides in the presentation. This sub-section contains articles describing the respective section binding types. Binding syntax Section bindings can [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"parent":150,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/pages\/4618"}],"collection":[{"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/info.documotor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4618"}],"version-history":[{"count":9,"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/pages\/4618\/revisions"}],"predecessor-version":[{"id":5390,"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/pages\/4618\/revisions\/5390"}],"up":[{"embeddable":true,"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/pages\/150"}],"wp:attachment":[{"href":"https:\/\/info.documotor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4618"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}