This example shows how to divide queried data from models and database into pages and create paging links to browse the pages.
PHPTal is used as the template engine for this example.
jQuery is used for the AJAX examples.
Where to find the example
This example is included inside the Artaengine package. You can find it in this directory:
download Artaengine package
Deploy and run the example
- Create a new database in PostgreSQL or MySQL and name it arta_examples. All Artaengine examples are set to use this database.
- Download the Artaengine package
- Extract into your "www" directory.
- It is recommended to create a virtual host for /www/artaengine/examples
- Find this example in /www/artaengine/examples/example10 enter the directory and follow:
- Edit the /configure.ini and update the settings to your local. Make sure the database connection configs match with the database you created for the example(s).
- Edit /factories/Example.php and edit the Example.connection() method, there is an example of a manual connection to a database (the connection configs are set inside the source code not the config.ini) change the connection configs to your database.
- Set permissions. Artaengine requires write permissions to the /_temp directory.
- Build the example e.g. (http://artaexamples.local/example10/build)
- If build shows errors:
- Check directory permissions
- Empty temp directory
- Check if "/start.php" and "/configure.ini" have correct paths and settings
- Check the database and model settings
Deploying with Artaengine project administrator
Alternatively you can deploy the examples via the Artaengine project administrator GUI
After deploying the Artaengine project administrator, goto the Existing menu and search for the examples. Add the examples to the administrator the goto the Update menu and manage the example you want.