Base class for user controls that handles CurrentPage in PageList
If you add an EPiServer Property control to the PageLists ItemTemplate it handles CurrentPage as expected, you can also get the CurrentPage by the binding expression:
<%# Container.CurrentPage %>
Lets say you have an user control (.ascx) in the ItemTemplate instead, then the CurrentPage will be the actual page the PageList control is added to. We can workaround this by having a property in our user control and set it to Container.CurrentPage.PageLink and set each Property’s PageLink to it, but let’s make it a little bit more sophisticated.
CurrentPage is resolved by implementing IPageSource or ICurrentPage. But how do we implement them?
Posted in EPiServer ● Tags base class, user controls
