Using backend layout files for template objects

Assigning a new layout to a template's data structure is very useful, but we might not want all objects to have to same layout for some reason. Specifically, we might want to assign different layouts to the templates with sidebars without worrying about our modifications showing up for all templates under the Main Template data structure. The good news is that we're not limited to assigning external layouts to Data Structure objects, but we can also assign them to Template Object objects easily. If we want to create a specific layout only for the Left Sidebar Template [Template], we can follow almost the same steps as we did for the Newsletter template:

  1. Create a new HTML file named belayout_left_sidebar.html in the templates directory (/fileadmin/templates/) with a basic HTML layout. We're going to add special instructions for our editors directly into the layout for this particular template. If we put instructions into the left sidebar area in belayout_main.html, they would show up on every page. This is a good reason to assign a special backend layout to just the Left Sidebar Template [Template] object:
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="utf-8" />
    <link rel="stylesheet" type="text/css" href="http:///fileadmin/templates/css/belayout.css">
    </head>
    <body>
    <table style="background-color: #fff;">
    <tr>
    <td id="logo" colspan="3">
    <img src="/fileadmin/templates/logo.png">
    </td>
    </tr>
    <tr>
    <td id="left_sidebar" style="background-color: #ddd;">
    <h3>Only use this sidebar for special links</h3>
    ###field_leftsidebar###
    </td>
    <td id="content">
    ###field_content###
    </td>
    </tr>
    </table>
    </body>
    </html>
    
  2. Click the edit icon next to the Left Sidebar Template in the TemplaVoila module:
    Using backend layout files for template objects
  3. Select our new HTML file, fileadmin/templates/belayout_left_sidebar.html, in the BELayout Template File field using the link icon on the right of the text field.
  4. Now we can save our changes at look at the new Page module in the backend:
    Using backend layout files for template objects
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.41.59