<div class="<%=model.class%>_current_branch"></div>
<div class="xaccordiontab"><img src="/images/icon_search.png" style="margin-right:7px;top:2px;height:14px;position:relative;" /> Component Templates Tips and URL Special Codes  </div>
<div class="xaccordionbody">
  <h3>Local vs Remote Templates</h3>
  There are three types of component templates - SYSTEM, LOCAL, and REMOTE:
  <ul>
    <li>SYSTEM templates are defined in the CMS "views\templates\components" folder for all sites</li>
    <li>LOCAL templates are located in the site's SFTP "templates\components" folder, and are automatically detected.</li>
    <li>REMOTE templates are located outside of the CMS server, and must be individually defined in the grid below.</li>
  </ul>

  <h3>Special Codes</h3>
  The following Special Codes can be used in the Component Template URL.  Special Codes are surrounded by three percent signs %%%:
  <ul>
    <li>%%%branch_id%%%</li>
    <li>%%%timestamp%%% &nbsp; <i>(The current Unix timestamp)</i></li>
    <li>%%%Any key defined in Template Variables%%%</li>
  </ul>
  Any key defined in the Deployment Target "Params" JSON can be used as a code.  For example, if the Deployment Target "Params" is set to:
  <pre>
  {
    "env": "staging",
    "base_url": "https://staging.company.com"
  }</pre>
  The "env" and "base_url" Special Codes could be used as follows in the Component Template URL:
  <pre>
  %%%base_url%%%/templates/components/slideshow.html?env=%%%env%%%</pre>

  <h3>Querystring Parameters for the Editor Template</h3>
  The editor sends parameters to the template using the querystring.  The following querystring parameters will be automatically added to the URLs:
  <ul>
    <li>branch_id</li>
    <li>_ &nbsp; <i>(Set to current timestamp for cache busting)</i></li>
  </ul>

  <h3>Separate Edit / Publish Templates</h3>
  If different templates are required for "Edit" and "Publish", the URL defined in the Component Templates grid will be used as the Edit template, and the Publish template URL should be defined inside Edit template, in the &lt;script type="text/cms-component-config"&gt; script tag:
  <pre>
  &lt;script type="text/cms-component-config"&gt;
  {
    "remote_templates": {
      "publish": "%%%base_url%%%/templates/components/banner.publish.html?source=1&_=%%%timestamp%%%"
  }
  &lt;/script&gt;</pre>
</div>
<div style="clear:both;height:5px;"></div>
<div class="<%=model.class%>_Templates_Location">
  <label class="label_fs_component_template_path">Local Component Templates - File System Location: <div class="fs_component_template_path"></div></label>
  <label class="label_sftp_component_template_path">Local Component Templates - SFTP Location: <div class="sftp_component_template_path"></div></label>
</div>
<div style="clear:both;height:5px;"></div>