Reusing Content Types and Views from Other Sites

If you are working on more than one site that have similar content structure, you can use the Bundle Copy module to export and import the code for the Content Types and Views. Once imported, you can adjust the Content Types and Views by adding fields and changing the display. Therefore, we recommend reviewing the basics for creating with Custom Content types.

Importing a Content Type

If you want to duplicate a Content Type or use a custom Content Type on more than one site, you can import the code with a simple copy and paste. 

Enable the appropriate modules

  1. Select Modules > Bundle Copy
  2. Locate and enable the Bundle Copy Module in the Module listing.

Importing a Content Type

  1. Select Structure > Content Types > Export from the Administration toolbar.
  2. Locate the Content Type you want to export, in this example Rotating Header Image.  
    Bundle Copy for exporting Content Types
  3. The next dialog asks you to select the fields you want to export. Be sure to click on the top checkbox to get all the fields. This example has only one field, but for more complex Content Types there would be more fields.
    Select the Field
  4. Click on Export and the following page with all the code that makes up the Content Type is listed. 
    Exported data code
  5. Place your cursor in the text and select all the text; then copy to the clip board. Be sure not to add any spaces or other characters. 
  6. Select Structure > Content Types > Import from the Administration toolbar.
  7. Change the name and paste the code in the fields as shown below
    Copy code in the other site
  8. Click on the Import button and the Content Type is created. 
  9. Check your Content Type by clicking on Structure > Content Types > Name of Content Type
  10. Click on Comments to ensure they are turned off. 
  11. Click on Display Settings and uncheck Display author and date information.

Export/Import a View

You can export a view and then import it to another site.  The view is the first step to creating the list or display you want; once imported, the view will need to be adjusted according to the site specifications. For more information on working with views, we recommend you review the YaleSites Views tutorial.

Export the View

  1. Select StructureViews > Export
  2. Locate the view you want to export, click on the Export button and copy the code like you did in the Content Type above. 

Import the View 

  1. Select StructureViews > Import
  2. Locate the view you want to export, click on the Export button and copy the code like you did in the Content Type above.
  3. Paste the code in the field and click on the Import button.Paste view code

Your page/block, etc is available for you to link or place on the site as desired.

This module used to be called Content Copy and works the same as the Content Copy module.