How to use layouts?

This is an example of a custom layout with two parts left_sidebar and sidebar. Custom layouts can be used for creating landing pages or custom styles for Redmine pages

<!DOCTYPE html>
<html lang="{{page.locale}}">
  <head>
    {{ 'main_styles' | stylesheet_page_tag: 'type:text/css' }} <!-- page with name main_styles will be included as css file => <link href="/pages/stylesheets/main_styles.css?20170703073152" type="text/css" rel="stylesheet"> -->
  </head>
  <body>
   {% if_part_content 'left_sidebar' %}
    <div id="left_sidebar">
        {% part_content 'left_sidebar' %} <!--current page part called "left_sidebar" will be rendered here if existed -->
    </div>
   {% endif_part_content %}
   <div id="content">
       {% content %} <!-- current page content will be rendered here if existed or Redmine page content -->
   </div>
    <div id="sidebar">
        {% part_content 'sidebar' %} <!-- current page part called "sidebar" will be rendered here or Redmine page Sidebar content -->
    </div>
  </body>
</html>
Was this article helpful? Yes  No
440 from 483 found this helpful