Hi,
What are the correct template-tag for @DwTemplateTags in HTML files in DW10?
Thanx in advance, NC
Hi,
What are the correct template-tag for @DwTemplateTags in HTML files in DW10?
Thanx in advance, NC
Hi NC.
Do not use HTML templates in DW10.
If you are in a razor template (.cshtml) you can do @DwTemplateTags() for the few remaining tag-based templates. Most templates these days are viewmodel based.
You have viewmodel based templates that looks like this in the top
@inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel>
When you have viewmodel based templates, you have a viewmodel to look at - these you can find in the C# documentation, e.g. https://doc.dynamicweb.dev/api/Dynamicweb.Frontend.PageViewModel.html
And you have template tag based templates that looks like this in the top:
@inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
Here you can use @DwTemplateTags() or @DwTemplateTags("search")
Thanx Nicolai,
I'm currently moving one custom-designed DW9 (html) solution to a DW10 solution.
It is fastest by copying html 1 to 1. It works so far...
But are you saying it's a no go?
/NC
html templates are still supported in DW10 - so if you are converting, that is fine.
<!--@TemplateTags--> is the notation for html based templates.
Hi again,
and thank you.
But I also tried the tag <!--@TemplateTags--> without a result.
What more can I try?
/NC
Sorry - It is <!--@DwTemplateTags--> - see docs
https://doc.dynamicweb.com/template-tags/introduction/helper-tags/templatetags
No worries... =) I tried that as well.
I asked because that one and any other combination I tried didn't work.
Is it an error? In that case I'll write to care.
Version: 10.11.1
Better convert the templates to razor.
I have not even seen html templates in at least 5 years - and we have tested absolutely nothing with html templates...
You must be logged in to post in the forum