Template::Plugin::NakedBody - Strip HTML to just keep the body content
# _included.html <html> <head> <style ...> </head> <body> This is content we need the stylesheet to see properly. </body> </html> # mypage.html [% USE NakedBody %] <html> <head> <style ...> </head> <body> Some content [% INCLUDE _included.html | NakedBody %] Some more content </body> </html>
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 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
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Template-Plugin-NakedBody
For other issues, or commercial enhancement or support, contact the author.
Adam Kennedy <adamk@cpan.org>
Thank you to Phase N Australia (http://phase-n.com/) 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.
To install Template::Plugin::NakedBody, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Template::Plugin::NakedBody
CPAN shell
perl -MCPAN -e shell install Template::Plugin::NakedBody
For more information on module installation, please visit the detailed CPAN module installation guide.