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

Forums / Developing with Sitefinity / How change template for document in document library?

How change template for document in document library?

4 posts, 0 answered
  1. xax_007
    xax_007 avatar
    55 posts
    Registered:
    24 Jul 2009
    30 Nov 2009
    Link to this post
    I need change for add texblock or rad editor in the view to add document to the document library, for example, when i upload a document i would like put more information for item...

    And Can I have a diferent templates for add diferents library items?

    Thanks

    Salu2,
    Pablo
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    30 Nov 2009
    Link to this post
    Hello Pablo Pérez Sánchez,

    Thank you for using our services.

    The file you should modify is ~/Sitefinity/Admin/ControlTemplates/Libraries/LibrariItemEdit.asx. If you wish to add new fields to store new meta data for documents you should add the controls to the ItemTemplate of the ContentMetaFields control with ID="itemMetaFields":
    <sfGCn:ContentMetaFields ID="itemMetaFields" runat="server">
        <ItemTemplate>
            ...
        </ItemTemplate>
    </sfGCn:ContentMetaFields>

    We are using one template for all types of library items, but then depending on the type of the library item that we are editing we hide unnecessary controls.

    Kind regards,
    Radoslav Georgiev
    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. xax_007
    xax_007 avatar
    55 posts
    Registered:
    24 Jul 2009
    01 Dec 2009
    Link to this post
    Hello Radoslav, thanks for reply

    sfGCn: In what assembly is this?

    I don´t find ContentMetaFields...

    I don´t understand what i do... could be more explicit?

    Salu2,
    Pablo
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    01 Dec 2009
    Link to this post
    Hi xax_007,

    ContentMetaFields

    Name: Telerik.Cms.Engine.WebControls.ContentMetaFields
    Assembly: Telerik.Cms.Engine

    You need to register tag prefix and make assemble reference if necessary.

    Regards,
    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