Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > How to show an event detail by clicking it in a repeater? View modes: 
User avatar
Member
Member
steven4733-gmail - 1/31/2012 3:38:21 PM
   
How to show an event detail by clicking it in a repeater?
Hi,

I use a repeater to display all the events that happened recently, order by the start date. Now I want the event in repeater to be a link that could be redirectd to another page show the details of event by clicking the link. I fould that when you create an event, it is not existing as a page. But I don't want to create one document type, one page for a same event. Any idea?

User avatar
Member
Member
steven4733-gmail - 1/31/2012 5:22:48 PM
   
RE:How to show an event detail by clicking it in a repeater?
I'm using
<a class="header bold" href="<%# GetDocumentUrl() %>"><%# Eval("Title") %></a>

but it says no data found after clicking the title.

User avatar
Kentico Support
Kentico Support
kentico_janh - 2/1/2012 3:56:23 AM
   
RE:How to show an event detail by clicking it in a repeater?
Hello,

The transformation looks fine, so you probably don't have set a Selected item transformation property in your repeater web part. Let me show you a working pair of transformations:

Transformation:
<h2><a href="<%# GetDocumentUrl() %>"><%# Eval("EventName", true) %></a></h2>
<p><%# Eval("EventSummary") %></p>
<p>
Event location: <%# Eval("EventLocation") %><br />
Event start: <%# Eval("EventDate") %>
</p>


Selected item transformation:
<h1><%# Eval("EventName", true) %></h1>
<table width="100%">
<tr valign="top">
<td width="150">
Event location:
</td>
<td>
<%# Eval("EventLocation") %>
</td>
</tr>
<tr valign="top">
<td>
Event date and time:
</td>
<td>
<%# Eval("EventDate") %>
</td>
</tr>
<tr valign="top">
<td colspan="2">
<%# Eval("EventSummary") %>
</td>
</tr>
<tr valign="top">
<td colspan="2">
<%# Eval("EventDetails") %>
</td>
</tr>
</table>


Best regards,
Jan Hermann

User avatar
Member
Member
steven4733-gmail - 2/1/2012 3:18:53 PM
   
RE:How to show an event detail by clicking it in a repeater?
OK, I created selected transformation and set this property on the repeater, it still says no data found in the page after I click the link. Did I miss something here?

User avatar
Kentico Support
Kentico Support
kentico_janh - 2/2/2012 5:48:45 AM
   
RE:How to show an event detail by clicking it in a repeater?
Hello,

That is strange, it should work. Could you please export me all properties you have set in that repeater?

Best regards,
Jan Hermann