Developer forum

Forum » Templates » Giving templates names in backend

Giving templates names in backend

Martin Nielsen
Reply

Hi DW,

When using designs and layout, all my templates get the filename in the administrationen.

For instance i have 2 page templates that use a master page. I named them standard.html and frontpage.html.
Now when i view them in Layout dropdown i get this:


The template name is shown, with and without extension.
Is it possible to set a more descriptive name for my templates?

The same goes for paragraphs, i see the filename, which isn't always the most informative to an editor.

// Martin


Replies

 
Martin Gammelholm
Reply
 Hi Martin,

The title of the layout is set by giving the template a title, this will then be the name of the layout.
You can write a description also, by defining a meta description in your template.

A good example is the standard Condition layout.


Best regards,
Martin | Dynamicweb Suppport
 
Merethe Nielsen
Reply

Give your template a title and you'll see that in your list.
Attached example.

/Merethe
DesignTitle.png
 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer
For layout templates, you can name them using the title tag of the head section. The name of the title will then display in the layout selector. You can also specify a description of the template in the meta description.

When having more layouts using the same master, they share title and description. That can be overruled by doing this in the layout file:
<!--@MasterPageFile(Master.html)-->
<!--@Layout.Title(Condition - sub layout)-->
<!--@Layout.Description(Use this layout for subpages)-->

You cannot control the name and description of the paragraph templates as it is now.


Votes for this answer: 0
 
Martin Nielsen
Reply

Thank you all for the aswer.
Nicolai's snippets was exactly what i was looking for.

Hope to see same support in Paragraph templates in DW8! :-)
 

 
Martin Nielsen
Reply

Btw. When using:
 

<!--@Layout.Title(Condition - sub layout)-->
<!--@Layout.Description(Use this layout for subpages)-->

They are rendered all the way to the final output HTML.
The tags should be removede when DW creates the "templatename.parsed.html" file.
 
Daniel Williams
Reply
Is what Martin Nielsen said, going to change?

 

You must be logged in to post in the forum