Creating and Deleting Templates

You can create, delete any template or create a copy of an existing template available in your project.

Creating Template

When you open a page within a website in the Flamingo IDE Code Editor, it automatically opens the template assigned to this page.

In case there is no template assigned to the opened page or you want to create a new template and assign it to page(s), you can follow any of the instructions specified below.

Note

You cannot assign a template to a page that doesn’t contain Flamingo initialization script at the top of the HEAD section.

You can create template via Template Manager or Code Editor.

Creating template in Template Manager

To create a template in Template Manager, you should:

  1. Open Template Manager by clicking the  Template Manager button on the left sidebar.

    Click Template Manager
  2. Click the New Template button in Template Manager.

    Click New Template
  3. New template will be created and its properties will be opened for editing. Enter template description, for example, “Summer action template”.

    Edit template description
  4. Adjust template assignment rules

    Define Condition
  5. Click the Edit button to edit template code.

    Click Edit

Creating template from Code Editor

You can create a template directly from Code Editor. To do this, you should:

  1. Open the site page you need to make responsive. Note that the page should not have any templates assigned to it.

  2. Click the  Edit Page button on the left sidebar.

    Click Edit Page
  3. In the message that appeared, click the Create New Template button.

    Click Create New Template

You will be redirected to Template Manager, where new template is created and assigned to the opened page. You can start editing template properties.

Note that in this case template will be assigned to this single page, but you can change assignment rules while editing properties.

Creating copy of an existing template

Flamingo IDE allows creating identical copies of existing templates that can be used, for example, for testing purposes.

Such copies of existing templates have the same parameters, HTML and property values as the initial template with the only difference in name: Copy of is added before the initial template name. You can use these copies to modify template without having immediate impact on pages operated by the initial template. To see how new template works, move it up above the initial template.

To create a copy of an existing template, you should:

  1. Open Template Manager by clicking the  Template Manager button on the left sidebar.

    Click Template Manager
  2. Expand the template you need to copy by clicking on template title.

    Open template properties
  3. Click Clone.

    Click Clone

Identical copy of your template will be created with the Copy of words before the initial template name. New template will be located below the initial template.

Deleting Templates

You can delete any template available in your project. To do this, you should:

  1. Open Template Manager by clicking the  Template Manager button on the left sidebar.

    Click Template Manager
  2. Expand the template you need to delete by clicking on the template title.

    Open template properties
  3. Click the Delete button.

    Click Delete
  4. Confirm the action by clicking Yes .

    Click Yes

The template will be deleted. Note that this action cannot be cancelled and the template cannot be restored.