View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Slaven Rezić > WE_Framework-0.097_03 > WebEditor::OldFeatures::MakeOnePageHTML



Annotate this POD

Module Version: 1.03   Source  


WebEditor::OldFeatures::MakeOnePageHTML - create a postscript file from the site


   use WebEditor::OldFeatures::MakeOnePageHTML;
   WebEditor::OldFeatures::MakeOnePageHTML::makeonepagehtml($webeditor_oldcontroller_object, %args);
   WebEditor::OldFeatures::MakeOnePageHTML::makeonepagehtml_send($webeditor_oldcontroller_object, %args);


This module provides the makeonepagehtml function which creates a single page HTML a web.editor site.


The HTML templates should be the same as the normal pagetype templates with the suffix _oph.tpl.html instead of .tpl.html. Usually these templates contain only partial HTML without <html>, <head> and <body> tags and should have no navigational elements.

The templates receive the normal parameters as in makehtmlpage and additionally the parameters level (useful in constructing the <h...> tag) and omit_title (true if it is advisable to omit the <h...> tag).

Additionally, the following templates should be defined:


The overall header of the HTML document. Here goes the <head> definitions and the opening <html> and <body> tags.

The template receives the normal TemplateVars and additionally the current lang parameter.


The overall footer of the HTML document. Here goes the closing <html> and <body> tags along with footer text for the document.

The template receives the normal TemplateVars and additionally the current lang parameter.


A template for a folder object with no own content. Typically this will contain only one <h...>title</h...> element.

This template receives the normal TemplateVars and additionally the lang, object (the current WE::Obj object), title and level.


The makeonepagehtml function arguments:

-lang => $lang

The language to process. By default the first site language is used.

-debug => $bool

Turn on debug mode if true. This will leave the temporary files after processing and show the command line arguments.

-o => $output_file

Specify an output file. If not set, then the output will be returned by the makeonepagehtml function.

The makeonepagehtml_send function arguments are same as for makeonepagehtml. This function automatically creates an HTTP header and prints the output to STDOUT.


Slaven Rezic.

syntax highlighting: