Developer forum

Forum » Templates » Reset template Dw8

Reset template Dw8

Christian Fisker
Reply
Where did the Reset() method on the Template class disappear to in Dynamicweb8?

I am upgrading a Dw7.2 application where I append template output to a StringBuilder for caching.
I was not able to get any output from a loop template so I did this instead:
StringBuilder buffer = new StringBuilder();
foreach(var product in products)
{
    RenderProduct(product, template);

    buffer.append(template.Output());
    template.Reset();
}
The Reset() method is no longer to be found.


Replies

 
Christian Fisker
Reply
This post has been marked as an answer

Looks like the Output() method resets the template, so my problem is solved.
This has probably been the case for many versions of Dw, so I apologise :)

/Christian
Votes for this answer: 0

 

You must be logged in to post in the forum