Skip to content

Database Collection

denisezamora edited this page Apr 4, 2019 · 17 revisions

A collection can easily be retrieved from any database table.

Defining database collections

A database collection can be defined easily by specifying the table where the collection should be retrieved from. For example:

collection:
   source: database?table=users

Note: database is a shortcut for com:pages.model.database.

The table parameter defines the name of the table and also accepts a table identifier.

Custom database collections

The ability to create custom collections is provided through extending the ComPagesModelDatabase class.

See: https://github.com/joomlatools/joomlatools-pages/blob/c3e516af66532aae19ab7d561aea0bea70196ab6/code/site/components/com_pages/model/database.php

Clone this wiki locally