More in this section

Forums / Bugs & Issues / Images and Documents Metafield

Images and Documents Metafield

2 posts, 0 answered
  1. KMac
    KMac avatar
    133 posts
    15 Dec 2008
    11 May 2009
    Link to this post
    Hello all,

    Here's a fairly easy to reproduce bug in Sitefinity_3_6_1927_Standard. I'm trying to add a metafield to a custom template for the LibraryItemEdit.ascx control. I've tried with datetime (because that's what I want), but it does the same for shortText.

    I've added the Metafield in the web.config like so:

              <add key="Libraries.Publication_Date" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="#Now"/> 

    I then used the controlsConfig.xml to map the template I want to use like so:

            <viewSettings hostType="Telerik.Libraries.WebControls.Admin.LibraryItemEdit, Telerik.Libraries" 

    I then edited the LibraryItemEdit.ascx with the following code:

        <asp:Label ID="Label9" AssociatedControlID="Publication_Date" runat="server">  
        <asp:Literal ID="Literal2" runat="server" Text="Publication Date"></asp:Literal> 
          <em id="Em2" runat="server"></em></asp:Label> 
        <telerik:RadDateTimePicker ID="Publication_Date" runat="server" ToolTip="Date">  

    I then go to upload or edit an existing document in the library and although the default datetime shows up initially, when I click save or update, changes to that field are not recorded. I tried this on a fresh install of the standard blank project and it did the same thing.

    Any thing I can do about it?
  2. Stoyanka Assenova
    Stoyanka Assenova avatar
    113 posts
    01 Dec 2016
    12 May 2009
    Link to this post
    Hello Kalvin MacLeod,

    If you want to use date format for publication date meta field you should set  valueType="DateTime" in the web.config file.
    <add key="Libraries.Publication_Date" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue="#Now"/>

    In the web.config file you should add Publication_Date meta filed in the "library info" section
    For example:
    <add name="Custom" title="Custom Library" defaultExtenstions=".*" metaKeys="Author, Description, Extension, Name, Size, Category, Publication_Date">

    If you have any problem, don't hesitate to contact us.

    Best wishes,
    Stoyanka Assenova
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
2 posts, 0 answered