Difference between revisions of "Hierarchy: Head Functions"

From Dreamwidth Notes
Jump to: navigation, search
 
(print_head function)
Line 12: Line 12:
 
function print_head [fixed];
 
function print_head [fixed];
 
</source>
 
</source>
Print server side supplied head content. This is a fixed function, so you can't override it. See [method[Page.print_custom_head()]] if you want to supply custom head content.
+
:::Print server side supplied head content. This is a fixed function, so you can't override it. See [method[Page.print_custom_head()]] if you want to supply custom head content.
 
 
 
::Structure
 
::Structure
  
<source lang="perl">
+
::<source lang="perl">
 
function Page::print_head()  
 
function Page::print_head()  
 
{
 
{
Line 24: Line 24:
 
</source>
 
</source>
  
<source lang="perl">
+
::<source lang="perl">
 
function Page::print_custom_head()  
 
function Page::print_custom_head()  
 
{
 
{
Line 30: Line 30:
 
}
 
}
 
</source>
 
</source>
Layers can override this to add extra HTML to the head section of the HTML document.  Note that layouts are not intended to override this method.
+
:::Layers can override this to add extra HTML to the head section of the HTML document.  Note that layouts are not intended to override this method.
 
 
  
 
::Variables
 
::Variables
  
<source lang="perl">
+
::<source lang="perl">
 
var readonly string head_content;
 
var readonly string head_content;
 
</source>
 
</source>
  
Extra tags supplied by the server to go in the <head> section of the output HTML document. Layouts should include this in the head section if they are writing HTML.
+
:::Extra tags supplied by the server to go in the <head> section of the output HTML document. Layouts should include this in the head section if they are writing HTML.
  
 
==print_head_title function==
 
==print_head_title function==

Revision as of 06:12, 8 May 2009

Documentation here.

print_head function

Associated Classes

class Page
Functions
function print_head [fixed];
Print server side supplied head content. This is a fixed function, so you can't override it. See [method[Page.print_custom_head()]] if you want to supply custom head content.
Structure
 

function Page::print_head() {

   print $.head_content;
   $this->print_custom_head();
}
function Page::print_custom_head() 

{

   # blank
}