Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Displaying various Custom Documents together by Date View modes: 
User avatar
Member
Member
Tom - 9/11/2011 12:35:22 PM
   
Displaying various Custom Documents together by Date
We have various Custom Docs (probably 7+) with Event Date in common & would like to gather records from them & present on one page by Event Date.

For example:

Sunday Sept 11, 2011

4:00 pm Football game (from Doc Type 1)
Dinner Steak (from Doc Type 2)

Sunday Sept 12, 2011

4:00 pm Football game (from Doc Type 1)
Dinner Steak (from Doc Type 2)

Sunday Sept 12, 2011

No events scheduled

===================

1) What type of web part would you suggest to be able to achieve the result / visual style shown above?

2) How can we show dates with no events generated from the various doc types displayed -- like Sept 12th?

3) What would be the key web part field settings to accomplish this?

4) When you are grouping various doc types together like this, how does the transformation know were the fields are coming from? Can you only include fields that are common to all doc types?

Thanks in advance!

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 9/12/2011 3:59:12 AM
   
RE:Displaying various Custom Documents together by Date
Hi,

you will probably need to create a hierarchical structure:

date1
---eventOfType1
---eventOfType2
date2
---eventOfType3

You could add this functionality using API to file: /CMSModules/Content/CMSDesk/Edit/edit.aspx (btnSave_Click method) and create a parent node using document API.

In this case you could use nested repeaters. The outside one will display dates and the inner one events. Here is an example of nested datalist (it works the same way for repeaters). The bold is inner datalist.


<strong><a href="<%# ResolveUrl(GetUrl( Eval("NodeAliasPath"), null)) %>">
<%# Eval("DocumentName") %></a></strong>
<br />

<cc1:CMSDataList ID="CMSDataList1" runat="server" ClassNames="cms.article" Path='<%# Eval("NodeAliasPath") %>'

TransformationName="cms.article.default" RepeatColumns="2" >

</cc1:CMSDataList>

<script runat="server">
protected void Page_PreRender(object sender, EventArgs e)
{
CMSDataList1.ReloadData(true);
}
</script>



As for displaying fields. You can use standard Eval method in transformation to display the content of fields. But only fields of current document type will be displayed. In other words only field common for all document types will be always resolved. In the version 6.0 - will be released in few days - you can define a different transformation for each document type so you do not need to define complicated "if" conditions inside the transformation.

Best regards,
Ivana Tomanickova