var myloop = Template.GetLoop("CustomLoop");
if i try to read myloop.Html it is empty
myloop Html is only availble after calling CommitLoop. This is too late for my current scenario.
I want to access the raw template html. I need to know if something is in the template. It is not a dw tag.
Please tell my how to access the loop template html without calling CommitLoop?
Developer forum
E-mail notifications
Template.GetLoop("CustomLoop") html?
Remi Muller
Posted on 11/07/2012 16:04:08
Replies
Morten Snedker
Posted on 12/07/2012 14:15:25
Hi Remi,
I don't quite get it...why don't you just open the file and look for what-ever you're looking for?
Or perhaps you could try to explain more explicitly what it is you try to accomplish?
I don't quite get it...why don't you just open the file and look for what-ever you're looking for?
Or perhaps you could try to explain more explicitly what it is you try to accomplish?
Regards
Morten Snedker
Remi Muller
Posted on 13/07/2012 17:05:52
It is used in a ProductListTemplateExtender
ExtendTemplate(Dynamicweb.Templatev2.Template Template)
{
var myloop = Template.GetLoop("CustomLoop");
myloop.Html is empty
I wanted to search the myloop.html.
I could look into Template.html. This contains the full (productlist) template. Right?
Is it valid to search the Template.html property to determine if some custom html element is in the template?
It is not always the same productlist html template. The filename is not in the Template object?
ExtendTemplate(Dynamicweb.Templatev2.Template Template)
{
var myloop = Template.GetLoop("CustomLoop");
myloop.Html is empty
I wanted to search the myloop.html.
I could look into Template.html. This contains the full (productlist) template. Right?
Is it valid to search the Template.html property to determine if some custom html element is in the template?
It is not always the same productlist html template. The filename is not in the Template object?
Vladimir
Posted on 16/07/2012 03:27:18
This post has been marked as an answer
Hi Remi!
Look at function Dynamicweb.Modules.Common.CommonMethods.GetLoopAsTemplate
I hope it is what you seek. Although this not works with xslt templates
Best regards,
Vladimir
Look at function Dynamicweb.Modules.Common.CommonMethods.GetLoopAsTemplate
I hope it is what you seek. Although this not works with xslt templates
Best regards,
Vladimir
Votes for this answer: 0
Remi Muller
Posted on 16/07/2012 17:38:05
Thanks that would work html templates.
In case of an xslt would the Template.Html contain the xslt markup?
In case of an xslt would the Template.Html contain the xslt markup?
I have another pending question:
http://developer.dynamicweb-cms.com/forum/development/filemanager-editable-extensions.aspx
Vladimir
Posted on 17/07/2012 04:28:13
Hi Remi,
yes, it will contain xslt markup
another question I gave answer in corresponding thread
Best regards,
Vladimir
yes, it will contain xslt markup
another question I gave answer in corresponding thread
Best regards,
Vladimir
Remi Muller
Posted on 19/07/2012 11:48:17
Thanks!
You must be logged in to post in the forum