November Happy Hour will be moved to Thursday December 5th.

Dynamic Content Control not rendering

Vote:
 

I have implemented the following example into my CMS6 site,

http://world.episerver.com/Articles/Items/How-dynamic-content-can-be-used-to-create-a-more-flexible-web-site/

I have followed all instructions and the dynamic content is showing up in the CMS, and seems to save ok.

But the page the content should show on does nothing, i have put a break point on the following method

 public Control GetControl(PageBase hostPage)
        {
            var rssControl = (RSSFeedControl)hostPage.LoadControl("/Templates/DynamicContent/RSSFeed/RSSFeedControl.ascx");
            rssControl.RssUrl = RssUrl;
            rssControl.MaxCount = MaxCount;
            rssControl.CacheDuration = CacheDuration;
            return rssControl;
        }

 public Control GetControl(PageBase hostPage)        {          

var rssControl = (RSSFeedControl)hostPage.LoadControl("/Templates/DynamicContent/RSSFeed/RSSFeedControl.ascx");
rssControl.RssUrl = RssUrl;
rssControl.MaxCount = MaxCount;
rssControl.CacheDuration = CacheDuration;
return rssControl;        

}

but it doesn't get called, I have also implemented my own dynamic content and it has the same behavior (shows in CMS, doesn't render)

Any ideas ppl?

#46397
Dec 09, 2010 17:07
Vote:
 

You need to show it like this

<EPiServer:Property PropertyName="MainBody" runat="server" />

#46401
Dec 09, 2010 20:54
Vote:
 

I'm not quite sure what you mean Anders, 

the user control that renders the dynamic content should render to the page its on? even if its not using any of the properties set?

Example : if a make the control just say "Hello world" it should show?

its not, it seems the loadControl is not getting hit...

 

#46409
Dec 10, 2010 10:47
Vote:
 

When you use dynamic content you need to show the property with the EPiServer:Property since that one ensures that your GetControl get executed

#46410
Dec 10, 2010 10:48
Vote:
 

Did this really solve the issue? I've got an upgraded 5 to a 6R2, and the rendering of my Dynamic Content control does not work. It's working in a fresh 6R2 environment. 

To me it seems like the GetControl() does not get called. Is there a known issue with this in respect to upgrading EPi 5?

#61528
Sep 21, 2012 10:57
Vote:
 

Make sure you decorate your dynamic content usercontrol classes with the correct attribute.  example [DynamicContentPlugIn(DisplayName = "Page Tree Menu", ViewUrl = "~/Controls/PageTreeMenu.ascx")]

#61548
Sep 23, 2012 23:30
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.