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
- Select Modules > Bundle Copy
- Locate and enable the Bundle Copy Module in the Module listing.
Importing a Content Type
- Select Structure > Content Types > Export from the Administration toolbar.
- Locate the Content Type you want to export, in this example Rotating Header Image.
- 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.
- Click on Export and the following page with all the code that makes up the Content Type is listed.
- 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.
- Select Structure > Content Types > Import from the Administration toolbar.
- Change the name and paste the code in the fields as shown below
- Click on the Import button and the Content Type is created.
- Check your Content Type by clicking on Structure > Content Types > Name of Content Type
- Click on Comments to ensure they are turned off.
- 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
- Select Structure > Views > Export
- 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
- Select Structure > Views > Import
- Locate the view you want to export, click on the Export button and copy the code like you did in the Content Type above.
- Paste the code in the field and click on the Import button.
Your page/block, etc is available for you to link or place on the site as desired.