Pagewize Client Library
This library can be used for those who develop Pagewize theme's.
Setup
The setup is quite simple:
- Download composer:
curl -sS https://getcomposer.org/installer | php
- type
php composer.phar install
, all dependencies are setup - Create a
config.php
file in the root fo the directory, please checkoutconfig.sample.php
as sample
Getting started
Make sure you're web server maps all the requests to the index.php
file in the root of the directory. We have attached a .htaccess
file in the root
of the project. If you use nginx read the online documentation.
The PagewizeClient
will always return the data for a homepage. This is the page that belongs to the /
url. From any other request the $_SERVER['REQUEST_URI']
(slug) is passed to the client and will return the content that matches that slug.
Template files are stored in the /tpl
folder.
Submit comments
To submit comments we recommend to point the form for submitting comments to the same url as the post. Use these variables as inut names: $_POST['name']
, $_POST['email']
, $_POST['comment']
, $_POST['parentCommentId']
. The post id is extracted from the $variables
array that is filled when executing the request.