This module is designed to take a page generated by your site and break it into a header and footer for use in creating a wrapper for an external site. This is useful when you have other sites providing content for you on their domain and you need your design wrapped around their content. Based on the capabilities of the other site, they can dynamically request the header and footer so that it is always up to date or you may cut and paste the generated HTML into their administrative systems when an update is required. This module takes care of modifying relative links and references to images/js/css files and will save a copy of aggregated JS and CSS files so that they remain available even through aggregation cache clearing.

This module splits a page generated by your site by looking for a string that indicates where the split should be performed. The string to look for is configurable in the admin section and there are many options for placing the string in your page. It can be placed as the content element or added to a template file. This module makes no restrictions on how you mark the location for the split.

Drupal 6

Example of setting up a wrapper:

Create a page on your site with no content other than the string to split the wrapper on. It is recommended that the string take the form of an HTML comment since it will be output as part of the header portion of the wrapper.

Configure the admin settings to set the string to look for.

Note the URL of your page. For this example assume it is example.com/pet_wrapper

To retrieve the header, make a request to example.com/third_party_wrappers/top/pet_wrapper
To retrieve the footer, make a request to example.com/third_party_wrappers/bottom/pet_wrapper

Development for D6 version of this module was sponsored in part by: Morris Digitalworks

Drupal 7

Example of setting up a wrapper:

  1. Create a page on your site with no content other than the string to split the
    wrapper on. It is recommended that the string take the form of an HTML comment since
    it will be output as part of the header portion of the wrapper.
  2. Configure the admin settings to set the string to look for.
  3. Note the URL of your page. For this example assume it is example.com/pet-wrapper
  4. To retrieve the header, make a request to example.com/third-party-wrappers/top/pet-wrapper
  5. To retrieve the footer, make a request to example.com/third-party-wrappers/bottom/pet-wrapper

There is a default wrapper page that contains no text other than the string to
split the wrapper on. This page is at example.com/third-party-wrappers-default.

To use it in the wrapper, make a request to
example.com/third-party-wrappers/[action]/third-party-wrappers-default, where
[action] is top, bottom, or all.

Development for D7 version of this module was sponsored in part by: Mediacurrent and Alaska Dispatch

Drupal 8

Example of setting up a wrapper:

  1. Create a page on your site with no content other than the string to split the wrapper on. It is recommended that the string take the form of an HTML comment since it will be output as part of the header portion of the wrapper.
  2. Configure the admin settings (example.com/admin/config/services/third-party-wrappers) to set the string to look for.
  3. Note the URL of your page. For this example assume it is example.com/pet-wrapper.
  4. To retrieve the header, make a request to example.com/third-party-wrappers/top?url=pet-wrapper.
  5. To retrieve the footer, make a request to example.com/third-party-wrappers/bottom?url=pet-wrapper.

There is a default wrapper page that contains no text other than the string to split the wrapper on. To request this page, simply leave off the url parameter, i.e., make a request to example.com/third-party-wrappers/bottom.

Development for the D8 version of this module was sponsored in part by: Mediacurrent

Project Information

Downloads