Table of Contents

Page Caching/Indexing

Introduction

As of version 3.1 Getsimple includes simple Caching/Indexing functions to help speed up page rendering.

The indexing file contains all information from each of your pages in one file (/data/other/pages.xml) which is made available to you in the Global $pagesArray Array.

Each time you edit or update a page the indexing file (/data/other/pages.xml) is updated.

Functions

The following functions are available

getPageContent($page)

Echos the content of the supplied $page to the screen.

getPageField($page,$field)

Echos the supplied $field from the given $page to the screen. If the $field supplied is 'content' getPageContent is called.

echoPageField($page,$field)

Alias of getPageField

returnPageContent($page)

Returns the content of the supplied page.

returnPageField($page,$field)

Returns the supplied $field from the given $page. If the $field supplied is 'content' returnPageContent is called.

getChildren($page)

Returns an array of child slugs of the given $page

getChildrenMulti($page,$options=array())

Returns an array of child pages with any additional options you want returned.

Hooks

caching-save

Allows plugins writers to add extra fields to the indexing file.

Available Fields

The following fields are available as default:

Any extra fields saved by plugins (e.g customFields & il8n_CustomFields ) will also be available.