Developer forum

Forum » CMS - Standard features » Template tags do not work

Template tags do not work

Ton Martens
Reply

on 8.4.1.23

 

Some templattags don't produce output. They cannot be found in the list of @DwTemplateTags while their value has been set.

For example DwTopGraphic

It has been set on the pagina, but the tag doesn't produce anything and it can't even be found in the @DwTemplateTags list.

 

Thanks


Replies

 
Kevin Steffer
Reply

on 8.7.1.0 in Razor it doesn't output anything on loop objects like:

@foreach (var item in GetLoop("QueryResultItem")) {
    @item.TemplateTags()
}
 
Ton Martens
Reply

Anyone? 

 
Nicolai Høeg Pedersen
Reply

Hi Ton

DwTopGraphic is a template tag that is related to the old implementation model - before designs and layout. So it is only rendered if you use the old stylesheet model - that is where the data comes from.

You could extend the website or page with a properties item with that image - those tags will be rendered.

 
Ton Martens
Reply

Hi Nicolao,

Thanks for responding. I'm confused. The DW backend offers many properties for pages like images etc. How am I supposed to disclose these properties in templates if the templates don't know about them? Isn't the point of templates, the ability of disclose page/paragraph-settings?

 

Ton

 
Nicolai Høeg Pedersen
Reply

Hi Ton

It is a property that has to do with the stylesheet implementation model. So they are not available if you are not using a stylesheet (old implementation model). According to the template tag reference, it is related to stylesheet model: http://templates.dynamicweb.com/TemplateTags/Dynamicweb-template-tags/Page-tags/Page/DwTopGraphic.aspx

 

You must be logged in to post in the forum