This project is not covered by Drupal’s security advisory policy.

Borrowed pane allows grouped caching and client-side re-use of rendered elements on a page.

Use cases

Grouped caching

When using mini-panels it is ideal to cache the entire mini-panel rather than cache the individual panes within the mini-panel.

The problem is that the mini-panel often contains one or more panes that are unique to the current page via context, the current page path, current user, etc.

Instead of rendering the unique content within the mini-panel you render the content elsewhere on the page, in an area that is not within a mini-panel you'd like completely cached. You then place a borrowed pane in each of the locations you need the unique content displayed within your mini-panel and specify the jQuery selectors to the content you'd like loaded into the pane.

Responsive support

When a site is built to be responsive, there are often times where it would be convenient to have a rendered pane/block appear in multiple places within the DOM.

The problem is that adding the same DOM to a page in multiple places is not ideal for SEO. Nor is it good from a performance standpoint to re-render the same DOM in multiple instances on a single page.

By using borrowed pane you can place your rendered DOM element wherever would be best for the initial page load. In any subsequent locations you desire for that rendered DOM to be visible, place a borrowed pane and specify the jQuery selector to the content you wish to copy.

Dependencies

  • CTools
  • Panels or another module which renders CTools content types (panes).

 

Created and maintained by the Bonnier Engineering Group. Learn more about Bonnier Corporation at bonniercorp.com.

 

Project information

Releases