top_banner.png
We cut 50% off all plugins prices during our anniversary celebration
Offer ends 29th Apr

We cut 50% off all plugins prices during our anniversary celebration

Common Questions

1. Are there more keywords at the required section name?

There are two default section names from Redmine content and the sidebar. Any other can be used in custom layouts.

<!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 -->
   </div>
    <div id="right_sidebar">
        {% part_content 'right_sidebar' %} <!-- current page part called "right_sidebar" will be rendered here -->
    </div>
  </body>
</html>

2. Question about the sidebar. Could I use 2 sidebars? One sidebar left, the content of the page in the middle, and another sidebar Right? Is that Possible?

This is not possible in the Redmine layout but can be done with custom. But you may add the left sidebar right in the page html code or add a part with some new name like "right_sidebar" and then use it in the page code:

{% part_content 'right_sidebar' %}

3. Question about Fields: I really don't understand Fields. I created some fields but nothing happens

Fields can be used inside the code of pages and parts as predefined variables:

{% page.fields['field_name'] %} //field from current page
{% pages['page_name'].fields['field_name'] %} //field from _ page_name_ page

4. Question about Layouts: How can I use it and integrate it with Redmine? When I created a code HTML (like a grid gallery at Google Images) and chose these layouts in settings, that layout loads as I navigate to an outside website. I know, probably using this completely wrong.

Layouts are used for creating external landing pages as we have in www.redmineup.com/pages/plugins/agile. You have to use a tag inside layout content to put their page code on rendering:

{% content %}

5. Question about Redmine action Layouts: I really don't know how to use them... How...?

This is for changing the layout for default Redmine pages as we did there ---> https://www.redmineup.com/questions. This is our plugin with a custom layout.

6. Question about Asset: Again, probably using this completely wrong. How...?

You can access Assets from page/part/snippet/layout code (add *:* before file name).

{{ ':image.png' | thumbnail_url: 'size:100', 'absolute:true' }} //global assets
{{ 'page1:image.png' | attachment_url: 'absolute:true' }} // page1 file url
{{ 'image.png' | thumbnail_tag: 'size:100', 'title:A title', 'width:100px', 'height:200px'  }} // current page file

7. Snippets, redmine hooks, global variables.... how?

{% render_snippet 'snippet_name' %}

{% site.variables['promotion_active'] %} //global variables

8. I miss the list of objects (projects, issues ....) and their methods (projects.all, project.name, issue.description ...

For example, I want to list all sup-projects of one project, something like that:

{% assign ps = projects.all | where: 'parent_id', 'tb-montaz-servis' %}
<table>
{% for project in ps %}
   <tr>
    <td>{{project.name}}</td>
   </tr>  
 {% endfor %}
 </table>

You may check the objects of Redmine which are described in the following Reporter documentation article.

Was this article helpful? Yes  No
114 from 149 found this helpful