Include other pages?

Vote:
 
Question nr 3: I have a page that only contains some internal banners for the right part of the site. Is there any way include this page into the site. I was thinking to let them select different bannerpages with dynamic property. So in one place I want to include page xxx, and in some other place I want to include yyy. So just load the rendered page in to ContentPlaceHolder.
#12977
Mar 25, 2008 18:35
Vote:
 
I haven't used Dynamic properties yet, but what about this. Let's say you have page A, B and C, and you have the banner pages F, G and H. Page A show banner page G Page B show banner page F Page C show banner page H In the template (for page A,B and C) you have a property called e.g. 'Select banner page' which is of type Page. This enables users to select a page using the page tree gui. Then when you set the PageLink for the right section, do something like this: PageReference pr = ((PropertyPageReference)CurrentPage.Property["SelectBannerPage"]).PageLink; MyPage.Pagelink = pr; MyPage.DataBind();
#15195
Mar 25, 2008 18:46
Vote:
 
EPiFields could be a concept to evaluate for your kind of need. I've done a similar thing with EPiFields. The contact cards on this site is EPiFields object and reused on many pages. Updated in one place. http://www.sek.se/templates/page___312__SV.aspx /HAXEN
#15196
Mar 25, 2008 18:46
Vote:
 
Thanks for the help on get me on the right track, just some small things that I changed to get it to work :) public string PrintBanner() { PageData oPage; PropertyPageReference pr = (PropertyPageReference)CurrentPage.Property["right_banner"]; oPage = Global.EPDataFactory.GetPage(pr.PageLink); return oPage.Property["text_banner"].ToString(); } Have a function that looks like this. It gets the dynamic property right_banner and cast it to a PropertyPageReference. After that I use GetPage to get the page with the pagelink of my reference. And after that I can access all normal properties of the different page. And for me I only needed one text filed. So I access that and return it. Why dynamic is so good here is because the editors can set on banner page at the start of the pagetree and all pages shows that. But if they want a different banner page somewhere, they just add another page at that part in the tree.
#15197
Mar 25, 2008 18:46
Vote:
 
FYI That can also be made directly with the EPiServer.WebControls.Property class. /HAXEN
#15198
Mar 25, 2008 18:46
* 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.