ASPX templates
Version 4.x > ASPX templates > Getting libraryaccess for a media library View modes: 
User avatar
Member
Member
longin-natgas - 6/22/2011 7:17:37 AM
   
Getting libraryaccess for a media library
I know this isn't good practice, but I hope I'll get forgivness for making a "double" post:

I did my orginal post in the wrong section (at least I think that is is the case here):

My goal is to create a site which lists all (Excel) Files of a certain Folder.


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"/>




Is this the right location for my problem ?

thanks

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 6/23/2011 3:15:23 AM
   
RE:Getting libraryaccess for a media library
Hello,

This seems to be a permission issue on the media library not a disk permission problem. Could you please log in as a global administrator into CMSDesk and try to repeat the steps on the live site?

Best regards,
Boris Pocatko

User avatar
Member
Member
longin-natgas - 6/24/2011 1:01:53 AM
   
RE:Getting libraryaccess for a media library
I'm currently using a login which has the role "CMS Desk Administrators" - is that enough ? Maybe I do not understand what you mean, but currently this media librarys permissions are are all set to "All users". Or are there other security options outside of the media libarys properties page that need to be adjusted.

Thanks for helping me

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 6/24/2011 9:08:22 AM
   
RE:Getting libraryaccess for a media library
Hi,

you can find an inspiration in following aspx example working with the media library structure described in my previous post:


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

<uc1:MediaFileDataSource ID="cntMediaFileDataSource" runat="server" LibraryName="czechcities"
WhereCondition="FileExtension='.JPG' AND FilePath LIKE 'folder/%' AND FilePath NOT LIKE 'folder/%_/%'" FilterName="cntMediaGalleryTree" FileIDQueryStringKey="fileid" EnableViewState="false" />

<uc1:MediaGalleryFileList ID="cntMediaGalleryList" runat="server" DataSourceName="cntMediaFileDataSource"
MediaLibraryName="czechcities" TransformationName="Community.Transformations.MediaLibrary"
SelectedItemTransformationName="Community.Transformations.MediaLibrarySelectedItem"
SeparatorTransformationName="Community.Transformations.MediaLibraryItemSeparator"
HeaderTransformationName="Community.Transformations.MediaLibraryHeader" FooterTransformationName="Community.Transformations.MediaLibraryFooter"
FileIDQueryStringKey="fileid" EnableViewState="false" />





The example displays only files from "folder" directory with .JPG extension. Please let me know if this solution is working for you. Then I will copy the answer to the second thread.

Best regards,
Ivana Tomanickova

User avatar
Member
Member
longin-natgas - 6/27/2011 2:07:53 AM
   
RE:Getting libraryaccess for a media library
Oh, stupid me !

The solution for my problem was, that used I used the folder name instead the codename for the MediaFileDatasources Libraryname - property.
So the files are listed now.

One last thing I like to ask for (on this topic) is a link to a page that explains how I can influence the way the librarys content is displayed. In only found this small info on the webparts propertys.

Thanks a lot for your patience (and help of course).

Have a nice start in your working week

User avatar
Member
Member
longin-natgas - 6/27/2011 3:53:21 AM
   
RE:Getting libraryaccess for a media library
Nevermind,
got the answer to my question myelf -> Transformations are our friends in this case