{"id":5444,"date":"2023-05-01T10:59:56","date_gmt":"2023-05-01T10:59:56","guid":{"rendered":"https:\/\/info.documotor.com\/?page_id=5444"},"modified":"2023-05-02T13:04:12","modified_gmt":"2023-05-02T13:04:12","slug":"shapereference","status":"publish","type":"page","link":"https:\/\/info.documotor.com\/?page_id=5444","title":{"rendered":"ShapeReference"},"content":{"rendered":"\n<p>Use ShapeReference to make internal references or links on a shape to another slide in the presentation. This allows users to navigate to specific slide by clicking an image, icon, or shape. <\/p>\n\n\n\n<h3>Syntax<\/h3>\n\n\n\n<p>Place the <code>ShapeReference<\/code> binding in the shape&#8217;s alternative text, that should have a link\/reference to another slide. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">&lt;&lt;ShapeReference:AltText$ShapeReferencePath&gt;&gt;<\/code><\/pre>\n\n\n\n<h3><br>Parameters<\/h3>\n\n\n\n<p><strong>AltText:<\/strong> Optional possibility to define an alternative text for shape.<br><strong>ShapeReferencePath<\/strong>: Key defined in the data. The value in the JSON is used to make a connection to the slide. The value of the key needs to be a string, integer, or float value. The value has to be unique from other <code>ShapeReferencePath<\/code>s and will only be used as a connection ID. This also means that this value will not be visible in the presentation. The <code>ShapeReferencePath<\/code> in the notes will be removed on generated documents.  <\/p>\n\n\n\n<p>On the slide that the link should jump to, place the <code>ShapeReferencePath<\/code> in the &#8220;notes&#8221; section on the slide as seen below. If more references are needed, the paths should be separated with a line break. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">#-- DocuMotor-References --#\nShapeReferencePath\n#-- DocuMotor-References-End --#<\/code><\/pre>\n\n\n\n<h3><br>Notes<\/h3>\n\n\n\n<p>The general logic for creating reference links to specific slides is to create a link that points to a slide with a specific ID. That means that the link should know which slide ID it is pointing to. To apply the ID to the targeted slide the <code>ShapeReferencePath<\/code> in the notes is relevant since this is where the value from the <code>ShapeReferencePath<\/code> is defined as the slide&#8217;s unique ID. The <code>ShapeReferencePath<\/code> defined in the ShapeReference binding, in the shape&#8217;s alternative text, should be the JSON path to a value that is identical to the value of the <code>ShapeReferencePath<\/code> defined in the notes of the targeted slide. <\/p>\n\n\n\n<h4>Example<\/h4>\n\n\n\n<p>Below is an example of how an icon links to a specific slide, where the slide are part of repeated slides accomplished with the <a href=\"https:\/\/info.documotor.com\/?page_id=648\" data-type=\"page\" data-id=\"648\">Repeat<\/a> section binding. <\/p>\n\n\n\n<p><strong>Template<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/info.documotor.com\/wp-content\/uploads\/2023\/05\/2023-05-02_14-43-09.mp4\"><\/video><\/figure>\n\n\n\n<p><strong>Output data<\/strong><\/p>\n\n\n\n<pre title=\"Output\" class=\"wp-block-code\"><code lang=\"json\" class=\"language-json line-numbers\">{\n    \"goToSlideId\": 2,\n    \"repeatedSlides\": [\n        {\n            \"title\": \"Title 1\",\n             \"slideId\": 1\n        },\n        {\n            \"title\": \"Title 2\",\n            \"slideId\": 2\n        },\n        {\n            \"title\": \"Title 3\",\n            \"slideId\": 3\n        }\n    ]\n}<\/code><\/pre>\n\n\n\n<p><strong>Generated presentation<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/info.documotor.com\/wp-content\/uploads\/2023\/05\/2023-05-02_14-46-33.mp4\"><\/video><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Use ShapeReference to make internal references or links on a shape to another slide in the presentation. This allows users to navigate to specific slide by clicking an image, icon, or shape. Syntax Place the ShapeReference binding in the shape&#8217;s alternative text, that should have a link\/reference to another slide. Parameters AltText: Optional possibility to [&hellip;]<\/p>\n","protected":false},"author":17,"featured_media":0,"parent":4623,"menu_order":6,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/pages\/5444"}],"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\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/info.documotor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5444"}],"version-history":[{"count":13,"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/pages\/5444\/revisions"}],"predecessor-version":[{"id":5524,"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/pages\/5444\/revisions\/5524"}],"up":[{"embeddable":true,"href":"https:\/\/info.documotor.com\/index.php?rest_route=\/wp\/v2\/pages\/4623"}],"wp:attachment":[{"href":"https:\/\/info.documotor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}