1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / get Library out of image URL

get Library out of image URL

2 posts, 0 answered
  1. Roman
    Roman avatar
    20 posts
    Registered:
    20 Jan 2009
    21 Mar 2010
    Link to this post
    Good evening

    I was wondering if there is a way to retrieve a library or library ID out of an image URL? (e.g. /SitefinityProject/Libraries/Libraryname/imagename.sflb.ashx)
    Such a function would make a dynamic option I have to create much easier :) I tried it myself, however I failed. Help would be appreciated very much!

    If this isn't possible, please tell me and I'll try another way.

    Thanks in advance
    Kind regards
    Roman
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    22 Mar 2010
    Link to this post
    Hi Roman,

    You could alter the urlREwriteFormat from the provider declaration

    <add name="Libraries" urlRewriteFormat="~/{Provider}/{LibraryName}/[Name].sflb.ashx"
    urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_" visible="False" defaultMetaField="Name"
    applicationName="/Libraries" allowVersioning="False"
    allowLocalization="False" localizationProviderName="" allowWorkflow="False" securityProviderName="" versioningProviderName="" connectionStringName="GenericContentConnection"
    type="DefaultProviderLibraries, App_Code" tagEditorTemplate="~/Sitefinity/Admin/ControlTemplates/Libraries/BatchTagsEditor.ascx" />

    Let me know if this helps.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
2 posts, 0 answered