Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > [Search] How To use the Media Gallery File List - Webpart View modes: 
User avatar
Member
Member
longin-natgas - 6/21/2011 7:45:12 AM
   
[Search] How To use the Media Gallery File List - Webpart
Is there a HowTo/Tutorial/Documentation for the Media Gallery File List - Webpart ?

My goal is to create a site which lists all (Excel) Files of a certain Folder.
The only snippet of information I found was http://devnet.kentico.com/FAQs/Media-libraries/How-to-show-only-certain-folders-in-media-library-.aspx

unfortunatly thats not enough information for me: how do I connect the datasource with the filelist and where do I define th propertys of the webpart ?

Any help would be much appreciated

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 6/21/2011 8:24:53 AM
   
RE:[Search] How To use the Media Gallery File List - Webpart
Hi,

you could extend the where condition of data source web part and add:

AND FileExtension='.xls'


This way only excel files will be selected. The list of available columns you can find in the Media_File table.

Best regards,
Ivana Tomanickova

User avatar
Member
Member
longin-natgas - 6/21/2011 11:35:58 PM
   
RE:[Search] How To use the Media Gallery File List - Webpart
Thanks for your fast reply, but unfortunatly I'm in the need for a more basic guidance:

- where nad how do I set the webparts properties
- how do I connect the datasource and the file list webparts

Thanks for your time

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 6/22/2011 2:28:17 AM
   
RE:[Search] How To use the Media Gallery File List - Webpart
Hi,

to display only .xls files from requested media library folder you can follow FAQ article you have provided in your first post, i.e. insert two webparts to one page:

In both set Media library property to your_media_library.

Media files data source
Set Where property to:
FileExtension='.XLS' AND FilePath LIKE N'folder/%' AND FilePath NOT LIKE N'folder/%_/%'

Media Gallery - File List
Set Data source name* - insert ID of data source web part

This way only xls files from folder with name "folder" should be displayed by File List web part, i.e. if the media library structure looks like:

/file.jpg
/folder/file.xls
/folder/file.png

only file.xls should be displayed.

Best regards,
Ivana Tomanickova


User avatar
Member
Member
longin-natgas - 6/22/2011 2:42:13 AM
   
RE:[Search] How To use the Media Gallery File List - Webpart
I fiddled a bit around and at least it doesn't give me an syntax error anymore when opening the website, but I now get an "You are not allowed to see media library content. Berechtigung'libraryaccess' vorausgesetzt".
Security settings for this folder are currently set to all users have all rights

Altough I am logged in as administrator.

Maybe you could evaluate my implementation ?:

I inserted this into the "head" of the aspx - file:


<%@ Register src="../../../CMSWebParts/MediaLibrary/MediaFileDataSource.ascx" tagname="dspricearchive" tagprefix="uc1" %>
<%@ Register src="../../../CMSWebParts/MediaLibrary/MediaGalleryFileList.ascx" tagname="pricearchive" tagprefix="uc2" %>


and inserted the following into the content "area":


<uc1:dspricearchive ID="dspricearchive" runat="server" FileExtension=".xls" WhereCondition="FilePath LIKE N'pugpriceachrive/%'"/>
<uc2:pricearchive ID="pricearchive" runat="server" DataSourceName="dspricearchive"/>


Thanks again for your time (and patience)

User avatar
Member
Member
longin-natgas - 6/22/2011 3:55:50 AM
   
RE:[Search] How To use the Media Gallery File List - Webpart
I see now, that I made a mistake by asking the question in this section of the forum -> I'm not using the portal engine directly rather a mix of it with aspx templates.

Could a moderator move this please into the right section ? Thanks

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 7/2/2011 9:40:04 PM
   
RE:[Search] How To use the Media Gallery File List - Webpart
Hi,

It's not that big deal and it might be useful here as well. I am just posting link to the other thread for other users reference :-)

http://devnet.kentico.com/Forums.aspx?forumid=41&threadid=21405

Best regards,
Juraj Ondrus