none
How to clone content editor web part in a template RRS feed

  • Question

  • Hi:

    Have a form library that can be re-used to create other areas for content.  Attached to this form library is a content editor web part.  Within the content editor web part we have a link to a javascript file that runs against this form library on load.  When we make a template from this form library the content editor web part does NOT get saved in the form template and does not get recreated when making a new form library.

    Is there a way to address this?

    Thank you

    Chuck

    Sunday, April 16, 2017 3:35 PM

All replies

  • Hi Chuck,

    When we save a library or list as a template, it only include the fields, content types, contents and other list/library settings inside the library or list.

    It will include the customizations on the page, such as the Content Editor we part added on the view page of the library.

    If you want to achieve this goal, you can create your own custom form library definition which has content editor web part added on the view page.

    Or you can create a feature to add Content Editor web part to the view page of a form library when a new form library is created.

    Best Regards,

    Victoria

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, April 17, 2017 11:54 AM
    Moderator
  • Thank you Victoria
    Monday, April 17, 2017 2:59 PM
  • Hi Chuck,

    If you think that my suggestion is helpful for you, you can mark it as answer and it will help other users who meet the same issue in this forum.

    Best Regards,

    Victoria


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, April 18, 2017 4:26 AM
    Moderator
  • Hi Victoria:

    We actually have done that, so must be missing something.  We get a document library set the way we want it and save it.  That saved document library DOES have a configured CONTENT EDITOR WEB PART.  But when we make a new document library from that saved document library template the content editor web part is missing.  In fact the web part zone where it was installed is empty.

    Any idea what we might be missing?

    Thank you

    Chuck

    Tuesday, April 18, 2017 2:47 PM
  • Hi Chunk,

    Save a library as a template will not work for such a scenario. You need to create a custom definition for the library.

    About list definition:

    https://msdn.microsoft.com/en-us/library/office/ms460922.aspx

    Best Regards,

    Victoria


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, April 19, 2017 2:19 AM
    Moderator