Jump to content

Creating the database

What is a database?

The Databases feature in Pages gives you the tools you need to create your own custom data-driven sections of your community. You define the settings and fields in the database, and Pages gives you support for categories, comments, reviews, ratings and more - just like full IPS Community Suite applications.

 

Creating the database

Databases are set up in the AdminCP, by navigating to Pages -> Databases. You'll see a listing of the current databases in your community. Click the Create New button to add a new one.

Details tab

On the first tab, we'll set up some basic details about our database. For the name, enter Recipes. This name is how users will see it presented throughout the community, such as on the search form.

Enter a description if you wish; this will be shown on the homepage of the database when users visit the page.

The next two settings determine how this database will handle categories and records. You can choose whether to use categories at all (the alternative being that records don't exist in categories, and are simply listed in the database), and if you do use categories, whether the user will see a category listing as the homepage or a blog-like article layout.

For our use, we are going to use categories, and we want to show the category listing, so select the appropriate options:

2021-09-09_13-44-45.png

Details tab

Next, we choose the templates this database will use. In our advanced tutorial we create custom templates to change how the database looks, but for this database, we're going to stick with the defaults so that we don't have to edit code.

Finally, there's the database key. This is how IPS4 identifies your database internally. You can leave this blank; it will automatically create a key for you.

Language tab

The fields on the language tab allow you to customize the words that IPS4 will use to refer to the records in your database (since 'records' is generic and non-descriptive in most cases). Because different languages have different grammar rules, there's five variations you need to specify. For English, we'll use these:

2021-09-09_13-45-05.png

Language tab

 

Options tab

The options tab is where more fine-tuned configuration of the database happens. We don't want wiki-style editing here (which is where any member can edit any record), and we don't need to store revisions for our use. We will enable searching, though. We'll also allow both comments and reviews. Therefore, the first half of the form looks like this:

2021-09-09_13-45-38.png

Options tab

Following these fields, we can set up the ordering of records in the database. Some built-in sort options are available in the dropdown list, but when you've added custom fields to the database later, they would also be available for sorting here. However, for our use, sorting by the built-in Publish Date and Descending is perfect - it means new records will show at the top, and be ordered in date-descending order.

The final section of this tab deals with the record image. This is a special built-in field that allows users to upload an image to represent each record. We'll use this functionality since it suits our purposes. The default settings will work for us:

2021-09-09_13-46-26.png

Record image settings

 

Forums tab

The forums tab sets up the Pages/Forums integration for records, meaning a topic is automatically posted when new records are added. We won't be making use of this functionality, so you leave it disabled.

Page tab

The final tab handles the page for your database. We created a page manually in the first step, so we don't need to do so again here, but this form is an alternative way of doing so. Leave this option set to I will add this database into an existing page.

 

After saving the form, you'll set up the permissions for the database, so configure those to your liking. Note that if a group doesn't have permission to access the page we created in Step 1, they won't be able to access this database even if you grant permission here.

Also note that in Pages databases, individual categories can override these permissions if desired, allowing you to set up defaults for the database here, but have categories where access is restricted to only certain groups (staff, or premium members, for example). 


  Report Guide


×
×
  • Create New...