All Classes Functions Variables Pages
Automad\Core\Page Class Reference

Public Member Functions

 getTemplate ()
 isCurrent ()
 isInCurrentPath ()
 isHome ()

Public Attributes

 $data = array()
 $tags = array()

Detailed Description

The Page class holds all properties and methods of a single page. A Page object describes an entry in the collection of all pages in the Automad class. Basically the Automad object consists of many Page objects.

Marc Anton Dahmen hello.nosp@m.@mar.nosp@m.cdahm.nosp@m.en.d.nosp@m.e
MIT license -

Definition at line 54 of file page.php.

Member Function Documentation

Automad\Core\Page::getTemplate ( )

Return the template of the page.

The full file system path of the template file.

Definition at line 133 of file page.php.

Automad\Core\Page::isCurrent ( )

Check if page is the current page.


Definition at line 152 of file page.php.

Automad\Core\Page::isHome ( )

Check if page is the home page.


Definition at line 184 of file page.php.

Automad\Core\Page::isInCurrentPath ( )

Check if the page URL is a part the current page's URL.


Definition at line 165 of file page.php.

Member Data Documentation

Automad\Core\Page::$data = array()

The $data array holds all the information stored as "key: value" in the text file.

The key can be everything alphanumeric as long as there is a matching var set in the template files. Out of all possible keys ther are two very special ones:

  • "title": The title of the page - will also be used for sorting
  • "tags" (or better AM_KEY_TAGS): The tags (or what ever is set in the const.php) will be extracted and stored as an array in the main properties of that page The original string will remain in the $data array for seaching

Definition at line 68 of file page.php.


The visibility status of a page within selections.

Definition at line 124 of file page.php.


The level in the folder tree.

Definition at line 96 of file page.php.


The relative URL of the parent page.

Definition at line 103 of file page.php.


The relative path in the file system.

Definition at line 89 of file page.php.

Automad\Core\Page::$tags = array()

The $tags get also extracted from the text file (see $data).

Definition at line 75 of file page.php.


The template used to render the page (just the filename of the text file without the suffix).

Definition at line 117 of file page.php.


The theme used to provide the template file.

Definition at line 110 of file page.php.


The relative URL of the page (PATH_INFO).

Definition at line 82 of file page.php.

The documentation for this class was generated from the following file: