Change theme:   


Generates button that links to page where new article or element can be created. The button will only be created when user is in edit mode. Therefore, the template author does not have to take care for the visibility of that button.

It is a good convention that the button is located on top of the article or element lists before any article or
element headings.

Generating link to new article page

It is advised to add this button to the blog page layout at the top of the articles list so the user can easily navigate to new article page:

<div id="articles">
  {% addbutton %}
  {% for article in articles %}
  <div class="article">{{ article.title }}</div>
  {% endfor %}

Generating link to new element page

As with articles on blog page, add button that links to new element page by appending it before elements list:

<div id="elements">
  {% addbutton %}
  {% for element in elements %}
  <div class="element">{{ element.title }}</div>
  {% endfor %}

If site has more than one element type, it is recommended to provide name of the type with "element_type" parameter. For example, if site has element type named "Job board", add tag as following:

{% addbutton element_type="Job board" %}

Styles and classes

This tag automatically adds "edy-site-menu-add" class to link element so design authors can customize this button. It is also possible to add custom styles and classes to link element by providing "class" or "style" attributes.

{% addbutton style="background: red !important;" class="my-custom-btn" %}