API15

JDocumentHTML: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
New page: <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> </span> {{Description:JDocumentHTML}} ===Defined ...
 
m preparing for archive only
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<span class="editsection" style="font-size:76%;">
This class defines a web page document.  Note that templates are executed within the scope of this object, so <code>$this</code> in a template is an object of type [[JDocumentHTML]].
<nowiki>[</nowiki>[[Description:JDocumentHTML|Edit Descripton]]<nowiki>]</nowiki>
</span>
{{Description:JDocumentHTML}}


===Defined in===
===Defined in===
Line 45: Line 42:
|Count the number of child menu items
|Count the number of child menu items
|}
|}
===Importing===
===Importing===
<source lang="php">jimport( 'joomla.document.html.html' );</source>
<source lang="php">jimport( 'joomla.document.html.html' );</source>


<span class="editsection" style="font-size:76%;">
 
<nowiki>[</nowiki>[[SeeAlso:JDocumentHTML|Edit See Also]]<nowiki>]</nowiki>
 
</span>
{{SeeAlso:JDocumentHTML}}


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=JDocumentHTML
  category=JDocumentHTML
  category=CodeExample
  namespace=CodeExample
  category=ClassExample
  category=ClassExample
  include=*
  include=*
  format= ,,,
  format= ,,,
</dpl>
</dpl>

Latest revision as of 00:31, 25 March 2017

This class defines a web page document. Note that templates are executed within the scope of this object, so $this in a template is an object of type JDocumentHTML.

Defined in

libraries/joomla/document/html/html.php

Methods

Method name Description
__construct Class constructor
getHeadData Get the html document head data
setHeadData Set the html document head data
addHeadLink Adds <link> tags to the head of the document
addFavicon Adds a shortcut icon (favicon)
addCustomTag Adds a custom html string to the head block
getBuffer Get the contents of a document include
setBuffer Set the contents a document include
render Outputs the template to the browser.
countModules Count the modules based on the given condition
countMenuChildren Count the number of child menu items

Importing

jimport( 'joomla.document.html.html' );



Examples

Code Examples