Quantcast
Channel: DevNet Questions
Viewing all articles
Browse latest Browse all 8832

How can you render widgets from a different page in Kentico?

$
0
0
I'm working with a Kentico application that uses the 'ASPX + Portal Engine' template type. In one of the pages, I need to display all the widgets and web parts (basically the whole page) from all it's child nodes.If I use the 'Portal Engine' template type and have the following code in a user control, it works just fine:@asp:Repeater runat=@server@ ID=@ChildPagesRepeater@ ItemType=@CMS.DocumentEngine.TreeNode@@ @ItemTemplate@ @div@ @p@@%# Item.DocumentPageTitle %@@/p@ @cms:CMSPagePlaceholder runat=@server@ ShortID=@p@ Path=@@%# Item.NodeAliasPath %@@ /@ @/div@ @/ItemTemplate@ @/asp:Repeater@ In the CodeBehind, I set the DataSource for the ChildPagesRepeater to the TreeNode children of the CurrentDocument and this 'just works'. But it just won't work with 'Portal Engine + ASPX' templates. What am I missing here?My last resort is to use a WebClient to get the child pages' markup and render it directly but I'd rather do it the 'proper' way. I've tested this and this does work but it doesn't feel like the 'right' way to do this.

Viewing all articles
Browse latest Browse all 8832

Trending Articles