×
Page module
Description
Page module helps you to create live editable pages on frontend.
Include
use yii\easyii\modules\page\api\Page;
Public functions
object Page::get( $id ) | ||
$id | integer / string | Page identifier can be integer (id) or string (slug) |
examples
Page::get(1); Page::get('about'); |
|
stdClass Object ( [id] => 1 [title] => "Page title" [text] => "Page html text" [seo_h1] => "Seo page title" [seo_title] => "Seo window title" [seo_keywords] => "seo, website, keywords" [seo_description] => "Seo description" [slug] => "page-slug" [empty] => false ) |
IF page with id == 1 or slug == 'about' exists |
stdClass Object ( [id] => "" [title] => "" [text] => "" [seo_h1] => "" [seo_title] => "" [seo_keywords] => "" [seo_description] => "" [slug] => "" [empty] => true ) |
IF page is not exist |
stdClass Object ( [id] => "" [title] => "<a href="...">Create page</a>" [text] => "<a href="...">Create page</a>" [seo_h1] => "" [seo_title] => "" [seo_keywords] => "" [seo_description] => "" [slug] => "" [empty] => true ) |
IF page is not exist and user logged in |