Connected Databases: list example

Read the previous article where we added a database filter to our portfolio database component. In this article we are going to add a database list that renders all portfolio items where a blog entry was a part of the portfolio database by using the "connected" filter.



Step 1: Add a database list to the blog database component

Go to the database components and click on blog article to go to the form builder.



Click the single item structure. Be sure this is a single item, indicated by the circle.



Select Database List and click Add Component.



Step 2: Database List Setup

Click on the Database List component you just added to enter the set-up.



Setup works as described in the database list article:


(1) Select the database you want the list to render

(2) Click Auto Create Vars to get the database input variables

(3) Add HTML code for a single list item

(4) Click save

Go back to the form structure


Click Code Editor to return to the detail page HTML code.



Step 3: Database component code

In the code editor add the [:renderlist:#ID:] code using the triple dots icon next to our single item.



As you can see in the example below we added the renderlist to the component.


Step 4: Edit entry

Go to the CMS database management page of the Blog database and edit one of the entries.



 Pick a Team Member.


(1) Setup the the entry

(2) Select the category of the list

(3) Open the Team Member database and pick the entry

(4) Click save


Step 5: Example result

Here is a result output of a connected database. In the detail page of the person we see a list of all the portfolio items where he was assigned to the team filter.


(1) database list filtered by another database (portfolio)