{"id":69,"date":"2016-01-25T18:25:09","date_gmt":"2016-01-25T18:25:09","guid":{"rendered":"http:\/\/www.stratadata.co.uk\/blog\/?p=69"},"modified":"2017-11-03T09:26:39","modified_gmt":"2017-11-03T09:26:39","slug":"decoupledpaneltemplates","status":"publish","type":"post","link":"https:\/\/www.stratadata.co.uk\/blog\/index.php\/2016\/01\/25\/decoupledpaneltemplates\/","title":{"rendered":"Decoupled Panel Templates"},"content":{"rendered":"<p>A previous comment on this blog noted &#8220;I still forget that changing something on the template I\u2019m working on changes all the previously made charts.&#8221; I promised to address the subject of decoupled panels. I don&#8217;t want to call this a &#8220;solution&#8221; because that would imply that templated panels are a problem! It is really useful to template panels, in the right context (more on that below).<\/p>\n<p>Decoupled panels have their place too. Sometimes you will want to make modifications to a panel which are very specific to one block template, project or well. Not only are you sure that you won&#8217;t need the panel elsewhere, you also want to protect it from out-of-context modification in the future.<\/p>\n<p>You could &#8220;copy&#8221; an existing panel template and work with your copy. You would still need to remember not to modify it later, and it would still be clutter in your panel templates list.<\/p>\n<p><strong>Decoupling<\/strong> is the process of making the copied panel template &#8220;local&#8221; or &#8220;private&#8221; to a block template. The panel is no longer associated with its original template; it is not named, it will not appear in the tree and cannot be used in other blocks. If the block template is read-only then this panel cannot be edited. Its settings will be lost if the block template is deleted. Underneath, it&#8217;s still using a panel template, but for all practical purposes the panel properties become part of the block template.<\/p>\n<p><a href=\"https:\/\/www.stratadata.co.uk\/blog\/wp-content\/uploads\/2016\/01\/decoupled.jpg\" rel=\"attachment wp-att-76\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-76\" src=\"https:\/\/www.stratadata.co.uk\/blog\/wp-content\/uploads\/2016\/01\/decoupled-287x300.jpg\" alt=\"decoupled\" width=\"287\" height=\"300\" srcset=\"https:\/\/www.stratadata.co.uk\/blog\/wp-content\/uploads\/2016\/01\/decoupled-287x300.jpg 287w, https:\/\/www.stratadata.co.uk\/blog\/wp-content\/uploads\/2016\/01\/decoupled-600x627.jpg 600w, https:\/\/www.stratadata.co.uk\/blog\/wp-content\/uploads\/2016\/01\/decoupled.jpg 643w\" sizes=\"auto, (max-width: 287px) 100vw, 287px\" \/><\/a><!--more--><\/p>\n<h3>How to decouple panels<\/h3>\n<p>The quick way: hold CTRL key when you drag a panel template from the tree.<\/p>\n<p>In depth:<\/p>\n<ul>\n<li>Add a panel template to your well block template in the normal way.<\/li>\n<li>If you decide to make a change to one panel which you do not want to be reflected in other blocks using that panel, you should decouple it. Right-click on the panel and choose<strong> Decouple from template<\/strong>.<\/li>\n<li>When you click on this panel, there will be no selection in the tree. The info pane in the bottom-right of the screen shows this message:<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.stratadata.co.uk\/StrataBugs\/v2.1\/help\/images\/paneldecouple.jpg\" alt=\"\" width=\"250\" height=\"44\" vspace=\"10\" \/><\/li>\n<li>You can edit and save the panel properties in the normal way (including discarding changes), provided that the block template is not set to read-only.<\/li>\n<li>When you save the block, any decoupled panels will also be saved.<\/li>\n<li>You can recouple the panel to another panel template at any time, by right-clicking and choosing<strong> Recouple to template<\/strong>. You can also use this option to create a new panel template from your local one.<\/li>\n<\/ul>\n<h3>Don&#8217;t forget the Standard Chart<\/h3>\n<p>Because the sort of panels you will want to decouple will be closely associated to a particular set of data, it makes sense that you would want to see this data whilst designing the panel. You can do this using the Standard Chart in Samples &amp; Interpretations. It will work on either a whole block or on a per-panel basis. Design the Standard Chart and save it as a block template, and any panels you have edited will be saved &#8216;decoupled&#8217;. You can find out more about the process <a href=\"http:\/\/www.stratadata.co.uk\/StrataBugs\/v2.1\/help\/samples_chartstab.html#design\">here<\/a>.<\/p>\n<h3>When not to decouple panels<\/h3>\n<p>Ideally, you will be working within a project (see <a href=\"https:\/\/www.stratadata.co.uk\/blog\/index.php\/2015\/12\/07\/templates-how-many-is-too-many\/\">this<\/a> previous post). Your panel templates are specialised for your project anyway. Working in a templates-based environment means that instead of creating an enormous chart with all the possible information on it, you can work in smaller, more focused units (blocks). Creating blocks is a very small task if you already have the panels set up. They will be shared, but probably only by a few blocks.<\/p>\n<p>&nbsp;<\/p>\n<p>What do you think?\u00a0Did you know about this feature? Should panels be decoupled by default?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A previous comment on this blog noted &#8220;I still forget that changing something on the template I\u2019m working on changes all the previously made charts.&#8221; I promised to address the subject of decoupled panels. I don&#8217;t want to call this a &#8220;solution&#8221; because that would imply that templated panels are a problem! It is really [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[6,9,10],"class_list":["post-69","post","type-post","status-publish","format-standard","hentry","category-charts","tag-blocks","tag-decoupled","tag-panels"],"_links":{"self":[{"href":"https:\/\/www.stratadata.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts\/69","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.stratadata.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stratadata.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stratadata.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stratadata.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=69"}],"version-history":[{"count":11,"href":"https:\/\/www.stratadata.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts\/69\/revisions"}],"predecessor-version":[{"id":519,"href":"https:\/\/www.stratadata.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts\/69\/revisions\/519"}],"wp:attachment":[{"href":"https:\/\/www.stratadata.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=69"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stratadata.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=69"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stratadata.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=69"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}