Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Setting up repeater web part to display files with hyperlinks. View modes: 
User avatar
Member
Member
DM - 8/6/2009 2:03:27 PM
   
Setting up repeater web part to display files with hyperlinks.
I have a file structure

Documents
--File1
--File2
--File3

Started off using the attachmentlist web part to display these but unfortunately the webpart doesn't support the permission based personalization.

So chose repeater as advised in http://devnet.kentico.com/Forums/f36/t9792/Customized-file-display.aspx.

For now I simply want to show the names of the files with a link in a repeater and then apply the permissons.

I setup a repeater webpart ; set the following properties
Show for document types : CMS.File
Path : /Documents/%
Transformation Name :CMS.File.AttachmentList (Just picked this. Want one that only shows a hyperlink to the file)

This does not work. Am I missing aything.

Eventually the files would be displayed based on user permissions (similar to thread http://devnet.kentico.com/Forums/f36/t9792/Customized-file-display.aspx) but I am not there yet.

Appreciate any help.

Thanks

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 8/6/2009 2:55:12 PM
   
RE:Setting up repeater web part to display files with hyperlinks.
Hello,

Could you please try to delete the "Show for document types : CMS.File" setting? Try to set the "Document types:" to " CMS.File". This should filter out and display just this type of documents. Please check, if there are any files displayed by altering the transformation to display just some static markup (e.g. "@") to see, if and how many documents are displayed. I would recommend you to check out our example web parts, which are set up and configured on every Sample Corporate site in the section Examples -> Webparts. You can find the repeater web part under Listings and viewers.

Best Regards,
Boris Pocatko

User avatar
Member
Member
DM - 8/6/2009 3:42:42 PM
   
RE:Setting up repeater web part to display files with hyperlinks.
Thanks Boris, That worked. I had setup the wrong property.

Currently it displays the list of files (names only).

I would like each file entry to display the following:
<Date it was created> < the name (hyperlinked)>.

Like

08/06/2009 Memo toAll Northern Units
08/07/2009 Holiday List for 2009
08/05/2009 Quarterly Meeting on 08/30/2009

How can this be achieved?

Thanks



User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 8/6/2009 4:07:55 PM
   
RE:Setting up repeater web part to display files with hyperlinks.
Hello,

I would recommend you to check out some transformation examples. You can access them by opening the Properties of the repeater, selecting "Edit" by the transformation, you are using, and clicking the link on the bottom "Click here to view list of transformations examples.". Try the <%# GetDocumentLink() %> or <%# GetDocumentUrl() %> transformation for the link. You can access the specific columns of the rendered document by using the <%# Eval("NewsTitle") %> function. Try the column name "DocumentModifiedWhen". You can find the database reference here. There are also functions for getting a formated date/time output. Please see the mentioned examples for more information.

Best Regards,
Boris Pocatko

User avatar
Member
Member
DM - 8/14/2009 2:43:59 PM
   
RE:Setting up repeater web part to display files with hyperlinks.
Thanks Boris.

I edited the transorfmation and got deisred results.
But this resulted in change on all the pages that use the transformation.
What if it is desired that format of the data Or the data itself displayed from the webpart is different on different pages.

Can we create custom transformations for web parts? if yes then please advice how. \

Thanks



User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 8/17/2009 3:31:36 AM
   
RE:Setting up repeater web part to display files with hyperlinks.
Hello,

Yes, you can create custom transformations. You don't need to modify the default transformations of the document type. For more information please see the following link.

http://devnet.kentico.com/docs/devguide/writing_transformations.htm

Please note, there is a button "New Transformation" on the mentioned page.

Best Regards,
Boris Pocatko