View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Adam Kennedy > Template-Plugin-Body-1.04 > Template::Plugin::Body



Annotate this POD

View/Report Bugs
Module Version: 1.04   Source  


Template::Plugin::Body - Strip HTML to just keep the body content


  # _included.html
    <style ...>
  This is content we need the stylesheet to see properly.
  # mypage.html
  [% USE Body %]
    <style ...>
  Some content
  [% INCLUDE _included.html | Body %]
  Some more content


The things we do to support designers...

When you are including a big chunk of HTML into a page via an include, you can have problems editing it in WYSIWYG editors because it won't have the stylesheets, meta tags and javascript libs that the main document does.

So for the sake of designers, the best solution is to provide the includes with full HTML headers, including proper styles and so on. They can do what they like in Dreamweaver or Editor De Jour. Then when including, we strip the wrapping off to get just the content.

And that's what this module does. It removes everything to keep only what is inside the body tags.


Bugs should be submitted via the CPAN bug tracker, located at

For other issues, or commercial enhancement or support, contact the author.


Adam Kennedy <>


Thank you to Phase N Australia ( for permitting the open sourcing and release of this distribution as a spin-off from a commercial project.


Copyright 2005 - 2008 Adam Kennedy.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this module.

syntax highlighting: