I made a custom loop and some custom tags under PageTemplateExtender's method:
public override void RenderTemplate(Dynamicweb.Templatev2.Template Template)
But only the custom tags work, the loop doesn't work.
I have tried add the same loop under ProductListTemplateExtender's method ' ExtendTemplate', it works there.
So, I wonder is there any limitation when people add a loop under PageTemplateExtender? Or just because I made something wrong?
Developer forum
E-mail notifications
Loop under PageTemplateExtender
Posted on 14/02/2011 10:24:37
Replies
Posted on 14/02/2011 10:35:07
Hi Judy,
Can you post the code for the extender and the template you're using?
Imar
Can you post the code for the extender and the template you're using?
Imar
Posted on 14/02/2011 10:51:49
Yes.
Posted on 14/02/2011 10:58:43
The picture is about the code which under the PageTemplateExtender.
Posted on 14/02/2011 11:03:04
Pfff, this forum creates such as mess from posted code ;-(
Can you either reformat the code or attach the relevant files? Quite difficult to see what's going on otherwise.
Also, did you post the code for the template?
Imar
Can you either reformat the code or attach the relevant files? Quite difficult to see what's going on otherwise.
Also, did you post the code for the template?
Imar
Posted on 14/02/2011 11:09:53
ESTuser.jpg: the paragraph has chosen modul 'Extranet/Intrannet(Udvidet)'.
est2.jpg: template code.
est2.jpg: template code.
Posted on 14/02/2011 11:48:17
This should work fine when you place the loop in the page template.
However, it seems you're extending an Extranet paragraph in which this won't work. You may be able to use a NotificationSubscriber for Paragraph.OnBeforeRender: http://engage.dynamicweb-cms.com/api/extensibility/Dynamicweb~Dynamicweb.Notifications.Standard+Paragraph~OnBeforeRender.html
Not sure if that's enough for your situation though.
Maybe someone else has better ideas.... ;-)
Imar
However, it seems you're extending an Extranet paragraph in which this won't work. You may be able to use a NotificationSubscriber for Paragraph.OnBeforeRender: http://engage.dynamicweb-cms.com/api/extensibility/Dynamicweb~Dynamicweb.Notifications.Standard+Paragraph~OnBeforeRender.html
Not sure if that's enough for your situation though.
Maybe someone else has better ideas.... ;-)
Imar
Posted on 14/02/2011 12:42:13
Thank you very much!
I decide to make a new custom module.
You must be logged in to post in the forum