$page->create($uri, $template, $data = array())

Creates a new page object

  • $uri (string)
    The URI of the page to create
  • $template (string)
    The name of the template to use for the new page
  • $data (array)
    The data for the page as $key => $value pairs
  • return ($page)

Example

<?php
try {
  $page->create('projects/project-d', 'project', array(
    'title' => 'A page title',
    'date' => '2016-02-21',
    'text' => 'Lorem ipsum dolor set amet ...'
  ));
} catch(Exception $e) {

  echo $e->getMessage();

}
?>

Is something missing or incorrect? Edit this page on Github…