Developer forum

Forum » Rapido » @TemplateTags() in Rapido templates

@TemplateTags() in Rapido templates

Jens Mouritzen
Jens Mouritzen
Reply

Why does the @TemplateTags()  not work on Rapido template files?

I got a couple of custom coded paragraph templates where it works fine. Se screendump/attachments for the "error"

 

 

pagenoecom.png paragraph-template.jpg

Replies

 
Nicolai Pedersen
Reply

Hi Jens

That is because the templates uses viewmodels which do not have tags at all. See how that works here in the docs: https://doc.dynamicweb.com/template-tags/introduction/concept/viewmodels

Since viewmodels are .net objects, they can also be found in the api docs: PageViewModel used in Layout templates: https://doc.dynamicweb.com/api/html/8175ac67-de8b-696a-7436-6505c1a61e47.htm and paragraph viewmodel used in paragraph templates: https://doc.dynamicweb.com/api/html/865d15b0-9823-0d92-eaf4-439339cee215.htm

BR Nicolai

 
Jens Mouritzen
Jens Mouritzen
Reply

Great, thanks Nicolai :)
Is there away to get properties from the PageViewModel in the ParagraphViewModel  ? 

 
Nicolai Pedersen
Reply

Yes. If you read the page I just posted on how they work, you would get your answer.

You can find all properties in the API documentation I linked - and for item types, you can look at this section to see the properties: https://doc.dynamicweb.com/template-tags/introduction/concept/viewmodels#4485

NP

 
Jens Mouritzen
Jens Mouritzen
Reply

Sorry Nicolai, i'm kind of new to this kind of coding :)  Thanks for the response !

 

You must be logged in to post in the forum