Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Display Publish from/to is not working View modes: 
User avatar
Member
Member
dinethnipuna-gmail - 10/28/2013 1:20:34 AM
   
Display Publish from/to is not working
Hi,
I have a repeater and I have used following code on the transformation. I can see the Title, but cannot see the Document publish TO date. Can someone please help me.

<table>
<tr>
<td> <%# Eval("Title") %> is currently being reviewed, and is now available for feedback from Fellows until
</td>
<td><%# GetDate("DocumentPublishTo") %> .
</td>
</tr>
</table>

User avatar
Kentico Support
Kentico Support
kentico_filipl - 10/28/2013 2:04:26 AM
   
RE:Display Publish from/to is not working
Hi,

The problem is DocumenPublishTo property is not returned in DataSet for the standard document types. With standard Repeaters, you can only display columns which the document type you are using contains in its definition (Site Manager -> Development -> Document types -> <your document type> -> Fields).

However, there is a way to achieve the same effect with a slightly different approach using Repeater with custom query. At first, you need to define a query which will return DataSet containing DocumentPublishTo column. Usually there are SQL views defined for that. So your query could look like this (example for built-in News doc type):
SELECT ##TOPN## ##COLUMNS## FROM View_CONTENT_News_Joined WHERE (##WHERE##) ORDER BY ##ORDERBY##

Then you just need to use this query in Custom query Repeater's configuration and Publish to property should then be rendered correctly.

Best regards,
Filip Ligac

User avatar
Member
Member
dinethnipuna-gmail - 10/29/2013 12:44:04 AM
   
RE:Display Publish from/to is not working
Hi Filip,

What I have done is create a Document attribute filed (PublishTo) in the document type. and used that in transformation with Eval("PublisTo").

I hope this is ok.

Thanks.

User avatar
Kentico Support
Kentico Support
kentico_filipl - 10/29/2013 9:24:09 AM
   
RE:Display Publish from/to is not working
Hi,

Sure, this approach works fine as well.

Best regards,
Filip Ligac