Documentation


Pages

The pages tag displays page info.

Tags

{pyro:pages:url}

Gets a page's URL based on its ID.

Attributes

Name Default Required Description
id None Yes The page id of  the page you want the URL for.

Example

{pyro:pages:url id="4"}​
http://www.example.com/about

{pyro:pages:children}

Tag pair that loops through the children of a parent page.

Attributes

Name Default Required Description
id None Yes Page ID of the page you want the children for.
limit None No Number of pages to return.

Example

{pyro:pages:children id="1" limit="2"}
	<h2>{title}</h2>
	{body}
{/pyro:pages:children}
<h2>Child One</h2>
Body Content One
	
<h2>Child Two</h2>
Body Content Two

{pyro:pages:display}

A tag that allows any one page to be displayed inside other content. Can be used as a double tag for ultimate control or a single tag to output the page body only.

Attributes

Name Default Required Description
id None No ID of the page you want to display.
slug None No Slug of the page you want to display.

Examples

{pyro:pages:display slug="home"}
	<h2>{title}</h2>
	{body}
{/pyro:pages:display}
<h2>Page Title</h2>
<p>Page Body</p>

{pyro:pages:display slug="home"}
<p>Page Body</p>

{pyro:pages:is}

A tag that says if a page is a direct child of another page or is a descendent of another page.

Attributes

Name Default Required Description
child None No ID or Slug of the page you want check relation.
children None No Children separated by a comma.
parent None No ID or Slug of the page to check if it is a parent of child.
descendent None No ID or Slug of the page to check if it is a descendent of child.

Example

{if '{pyro:pages:is child="ingredients" parent="cookbook"}' == true}
<p>
    Click here to see table of contents cookbook
    etc...
</p>
{/if}

Display:

Click here to see table of contents cookbook
etc...
{if '{pyro:pages:is child="terms-and-conditions" parent="information"}' == true}
<body class="terms information">
{else}
<body class="">
{/if}

Display:

<body class="terms information">

{pyro:pages:page_tree}

A tag that displays a tree of pages starting from the id specified.

Attributes

Name Default Required Description
start_id* None Yes *Deprecated in v1.3.0 Replaced by start-id
start-id None Yes The ID of the page you want to display children for.
disable-levels None No A list of page slugs to skip separated by the pipe character. Example: secret|super-secret|nuclear-codes
order-by title No The database column to order the pages by
order-dir asc No The direction to sort the pages

Examples

{pyro:pages:page_tree start-id="20"}


<ul>
     <li><a href="http://example.com/page">Page Name</a>
          <ul>
               <li><a href="http://example.com/page/child">Child Name</a></li>
          </ul>
     </li>
</ul>