More in this section

Forums / Developing with Sitefinity / Sitefinity 3.7 API Problem

Sitefinity 3.7 API Problem

4 posts, 0 answered
  1. karnan sekar
    karnan sekar avatar
    80 posts
    Registered:
    07 Jul 2009
    20 Oct 2009
    Link to this post
    Hi,

    I have added SFlib button selector in LibraryItemEdit.ascx to add images for videos . i have configured in web.config too.

    <sfGCn:ContentMetaFields ID="itemMetaFields" runat="server">
                        <ItemTemplate>
      <li class="selector">
                            <asp:Label ID="Label13" AssociatedControlID="Thumbnail" runat="server"><asp:Literal ID="Literal2" runat="server" Text="<%$Resources:Thumbnail %>"></asp:Literal> <em id="ThumbnailLabel" runat="server"></em></asp:Label>
                            <asp:TextBox ID="Thumbnail" Text="" runat="server" MaxLength="250"></asp:TextBox>
                            <sfLib:ButtonSelector WindowNavigateUrl="~/Sitefinity/UserControls/Dialogs/ImageEditorDialog.aspx" ItemTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/Dialogs/ButtonSelector.ascx" AssociatedControls="Thumbnail" runat="server" cssclass="pickerWrapper" ButtonText="<%$Resources:Select%>" />
                            <p class="example">
                                <asp:Literal ID="Literal28" runat="server" Text="<%$Resources:ThumbnailNote %>"></asp:Literal>
                            </p>
                        </li>


    I have did coding as below


     foreach (IContent ICntVideo in listAllVideos)
     {
       string url = ICntVideo.GetMetaData("Thumbnail").ToString()
    }

    Url gives an output like [Libraries]38f7d49f-3b63-490e-b0c5-14305c9a4e2b

    Please tell us to how to retreive the images from the metafields

    Regards,
    Karnan

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    20 Oct 2009
    Link to this post
    Hello karnan sekar,

    You need to resolve the dynamic link. For more information, please take a look at Resolving the url of dynamic links.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. karnan sekar
    karnan sekar avatar
    80 posts
    Registered:
    07 Jul 2009
    21 Oct 2009
    Link to this post
    Hi Ivan Dimitrov,
    Thanks a lot it is working. But still we need to spilt  the meta fields and pass this to a method. Please upgrade this in the upcoming version.

    Thanks,
    Karnan

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    21 Oct 2009
    Link to this post
    Hello karnan sekar,

    IContent supports only SetMetaData(string key, object value); and object GetMetaData(string key); The current implementation if the views allow only one ContentMetaFields . If you have a custom module or replace the view you can persists the values from many ContentMetaFields  instances.

    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
4 posts, 0 answered