Hey guys,
Subject says it all;
I'm writing a custom ProductListTemplateExtender. Now i need the PageID and ParagraphID where the ProductList is rendered on.
Any ideas how to get these values ?
-Emil
Developer forum
E-mail notifications
TemplateExtender: how to retrieve PageID an...
Posted on 23/11/2007 16:50:15
Replies
Posted on 26/11/2007 14:50:26
nevermind, i found a workaround.
Posted on 28/11/2007 13:46:09
- Can you please post your workaround.
- What is the DynamicWeb suggestion to retrieve this ?
// Jeslas!
Posted on 05/12/2007 14:26:50
My workaround was to read the values of the existing Dynamicweb template tags.
I used the following code in a page template extender:
int iPageID = 0;
if (Template.Tags.getTagByName("DwPageID")!=null)
if (ATemplate.Tags.getTagByName("DwPageID").Value.Length > 0)
iPageID = Convert.ToInt32( ATemplate.Tags.getTagByName("DwPageID").Value );
Posted on 14/01/2010 10:43:51
A better way wound be through the Pageview object.
Dynamicweb.Frontend.PageView pv = Dynamicweb.Frontend.PageView.Current();
int id = pv.Page.ID;
You must be logged in to post in the forum