Did I explain poorly or is it something that is hard/imposseble to do without coding it myself? I ll take it again in case I messed things up too much.
I have a page where I want to list(with pageing) all pages that reside under it.
Can I do this with Episerver PageList or anything else that do not involve coding the thing myself?
Hello Pontus,
You could use the PageList something like this:
<EPiServer:PageList runat="Server" id="PageList1" PageLink="<%#CurrentPage.PageLink %>" Paging="true">
<HeaderTemplate>
<ul>
</HeaderTemplate>
<ItemTemplate>
<li>
<EPiServer:Property PropertyName="PageLink" runat="server" />
</li>
</ItemTemplate>
<FooterTemplate>
</ul>
</FooterTemplate>
</EPiServer:PageList>
And in codebehind you'll have to databind:
protected void Page_Load(object sender, EventArgs e)
{
PageList1.DataBind();
}
Awesome Nicklas!
Exactly what I meant. You should put that as an example for PageList in the SDK.
Thanks alot Nicklas and a have great day everyone!
Edit: When i think about it, it might have been the databind that was missing when I tryed to use it earlyer.
Is it obvious that you have to databind in this situation?
(All episerver templated controls needs manual databind?)
Am I mistaken to think that controls useally databind themself when the page is loaded for the first time?
If you use PageLink="<%#CurrentPage.PageLink %>" you have to Bind it.
If you use PageLinkProperty="PageLink" you don't.
Ok Erik that somewhat makes sense considering one is "dynamtic" and one is static.
Yet in one way it dont make sense because even the static one will use dynamic data in the end.
Anyone knows the mechanics behind this and want to explain?
Edit: just when i posted this I might have figured it out.
You have to bind it if u send the control dynamic data, however if the control picks up the dynamic data it can bind itself?
Hello everyone!
Lovely friday ain't it? Anyways, here it goes.
I Have a bunch of "polls", multiple instances of a custom made episerver page .They are all residing inside another page made for the purpose of holding the "polls".
In the holding page I want to list all the "polls" that resids under it, with some "sum up" information from the pages like, date created, name, question and a link to the "poll".
I have allready done this with custom made code, however when i showed this, the posseble recivers of the thing am making said they want the listing too look like it allways dose in episerver.
I was first thinking about recoding the listing so that it woude somewhat look like the episerver one, however then i though, hey maybe there is a episerver something I can use for this.
PageList sounds like it coude be used but I dont really understand how to use it, I try to do it like in the SDK but nothing shows up and the SDK really dont say much.
Any tips/ideas/suggestions woude be appreciated.
Kind Regards
Pontus