Attention Updating custom templates to be compatible with Subrion 3.2.0

Discussion in 'Subrion CMS Templates' started by Gleb S., Oct 20, 2014.

  1. Gleb_S.

    Gleb_S. Subrion Designer Staff Member

    Hello guys!
    As you may already know, we've released Subrion 3.2.0 which has tons of improvements and bugfixes. There's also a new default template called Startup! We've tried to make things much easier and that affected templates' layout a little bit.

    So here are instructions on how to upgrade your custom template to be compatible with latest version.

    1. Changed files structure.
    How files should be placed:
    - install.xml file should be placed in the root folder of your template.
    - 'info' folder renamed to 'docs'
    - preview.jpg (template icon) placed in 'docs/img' folder and renamed to icon.png. Please use PNG format for icon.
    - all screenshots should be placed in 'docs/img' folder.

    template-file-structure.jpg

    2. Changed install.xml structure.
    We've removed configuration group for positions and placed everything related to them in <layout> section.
    This line should be removed:
    Code (Text):
    <config group="general_config" name="block_positions" type="hidden" description="position">inventory,mainmenu,header,after_header_1,after_header_2,after_header_3,verytop,top,left,right,bottom,user1,user2,verybottom,copyright,footer1,footer2,footer3,footer4</config>
    Instead use <layout> section for defining positions:
    Code (Text):

    <layout>
        <position menu="1" movable="0">inventory</position>
        <position menu="1" movable="0">account</position>
        <position menu="1" movable="0">mainmenu</position>
        <position menu="1" movable="0">copyright</position>

        <position movable="0">header</position>
        <position>verytop</position>
        <position>top</position>
        <position>bottom</position>
        <position>verybottom</position>

        <section name="header">
            <position width="3">header1</position>
            <position width="3">header2</position>
            <position width="3">header3</position>
            <position width="3">header4</position>
        </section>
        ...
    </layout>
     
    3. Changed layout. Please follow these steps to update layout file:
    1. Find
      Code (Text):

      <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
      <!--[if lt IE 9]>
          <script src="{$smarty.const.IA_CLEAR_URL}js/utils/shiv.js"></script>
      <![endif]-->

      <link rel="shortcut icon" href="{$smarty.const.IA_CLEAR_URL}favicon.ico">
       
      Replace with:
      Code (Text):

      <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
      <!--[if lt IE 9]>
          <script src="{$nonProtocolUrl}js/utils/shiv.js"></script>
      <![endif]-->

      <link rel="shortcut icon" href="{$nonProtocolUrl}favicon.ico">
       
    2. Find
      Code (Text):

      {ia_print_css display='on'}
      {ia_add_js}
          {foreach $customConfig as $key => $item}
              intelli.config.{$key} = '{$item}';
          {/foreach}
      {/ia_add_js}
       
      Replace with:
      Code (Text):

      {ia_print_css display='on'}

      {ia_add_js}
          intelli.pageName = '{$pageName}';

          {foreach $customConfig as $key => $value}
              intelli.config.{$key} = '{$value}';
          {/foreach}
      {/ia_add_js}
       
    3. Find
      Code (Text):

      <!-- SYSTEM STUFF -->

      {if $config.cron}
          <div style="display: none;">
              <img src="{$smarty.const.IA_CLEAR_URL}cron/?{randnum}" width="1" height="1" alt="">
          </div>
      {/if}

      {if isset($manageMode) || isset($previewMode) || $ie6}
          <div id="manage-mode">
              {if isset($manageMode)}
                  <p><i class="icon-gears"></i>{lang key='youre_in_manage_mode'}</p>
              {/if}
              {if isset($previewMode)}<p>{lang key='youre_in_preview_mode'}</p>{/if}
              {if $ie6}<p>{lang key='youre_in_ie6_mode'}</p>{/if}
          </div>
      {/if}

      {ia_print_js display='on'}

      {ia_hooker name='smartyFrontFinalize'}
       
      Replace with:
      Code (Text):

      <!-- SYSTEM STUFF -->

      {if $config.cron}
          <div style="display: none;">
              <img src="{$nonProtocolUrl}cron/?{randnum}" width="1" height="1" alt="">
          </div>
      {/if}

      {if isset($manageMode)}
          {include file='visual-mode.tpl'}
      {/if}

      {if isset($previewMode)}
          <p>{lang key='youre_in_preview_mode'}</p>
      {/if}

      {ia_print_js display='on'}

      {ia_hooker name='smartyFrontFinalize'}
       

    We've also created new default template for Subrion 3.2 called Startup (demo: http://demos.subrion.com/?demo=startup). We highly recommend to use this template when creating your own, as it has all necessary styles for all our plugins and packages.

    If you have any questions regarding updating your template, please post them in this thread.
    Last edited: Oct 27, 2014
    Andrew_G. and Vasily_B. like this.
  2. olairmarcos

    olairmarcos Member

    Thanks for the great work. We have a change in the layout of the template?

    Version 3.2.0 template start
    2014-11-12_164911.jpg

    Version 3.2.1 template start
    2014-11-12_170317.jpg
    Change in the render-menu.php

    <ul class="nav-account">
    <li><a class="btn-account" href="{$nonProtocolUrl}login/">{lang key='su_login'}</a></li>
    <li><a class="btn-account" href="{$nonProtocolUrl}registration/">{lang key='su_signup'}</a></li>
    </ul>
    2014-11-12_172834.jpg
    Thanks.
    Last edited: Nov 12, 2014
    SnapDirectory likes this.
  3. Gleb_S.

    Gleb_S. Subrion Designer Staff Member

Share This Page