Skip to content

Database Collection

Waseem Sadiq edited this page Jun 7, 2019 · 17 revisions

A collection can easily be retrieved from any database table.

Frontmatter

A database collection can be simply defined 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

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