The sky is the limit with BlueberryCMS Data Collections!
Our Data Collections feature is one of the strongest, flexible, and most advanced core functions of BlueberryCMS. Data Collections allow you to create your own custom data driven web applications with ease.
Some of the most popular use cases for Data Collections are:
- Restaurant Menus
- Real Estate Listings
- Business Directories
- Automobile Listings
- Dynamic Image Sliders (Hero Sliders)
- Video, Photo, and Media Libraries for Creators
- Product Databases
- And so, so much more.
Placing a Data Collection on a Web Page
You can easily insert a Data Collection on any Web Page, Page Template, Content Holder or Include file simply by using the {bb_datacollection} tag. Be sure to include spaces in the name if you have them. This will display the complete list of Data Collection Items.
{bb_datacollection source="Data Collection Name"}
What are the components of a Data Collection?
Items tab
These are essentially the rows of your database that contain the Data Items themselves. It could be a list of book reviews, recipes, videos, real estate listings, etc. You can setup your own custom fields which are basically the "columns" of your database which we'll discuss later.
Settings tab
Each Data Collection has a variety of settings that can be applied.
- Collection Name - Name your Data Collection so you can identify it in the list. This name is also used to reference the Data Collection on Web Pages.
- Detail Template - The Detail Template is the design template that controls the Web Page layout. Similar to how Page Templates are related to Web Pages, except this Page Template only applies to the "detail view" of a specific Data Item.
- Parent Collection - Create a hierarchy of Data Collections to link the data between them.
- Expiry Date - This is the date the Data Collection will no longer be available on the live web site. Check "Never Expire" for items to be visible forever.
- Disable Detail Page - This setting control whether a Data Item has a "Detail View" page. Some list type Data Collections don't require items to have a detail view.
- Allow GEO Mapping - This control whether the Data Collection is going to use the mapping feature for items. A business directory website would be a perfect solution for GEO Mapping.
- Include in Site Map - When Data Collection items have a "Detail View" page, a URL is created. This setting gives you the power to have that URL included in the website's sitemap.xml file.
Fields tab
The fields in a Data Collection define the type of data you're collecting. Common items might include names, addresses, rich HTML content, phone numbers, files, URLs, dates, etc, there are options for just about everything!
Data Collection fields can then be referenced in your layouts as such:
{{dataName}}
{{dataPublishDate}}
{{custom}}
{{fields_with_spaces_require_underscore}}
Custom Fields section
Any custom field that is added to the Data Collection will appear in this section.
Address Fields section
When "GEO Mapping" is enabled on the "Settings" tab, this section of Address fields appears.
Default Fields section
Default Fields control the basic set up elements of the Data Collection.
Layouts tab
Displaying Data Collection data follows the list view / detail view method. You can create as many list view layouts as you want, but there is only one "detail view" layout.
These 'default' layouts are created with every Data Collection and can be edited but not deleted.
List View Layouts
The List View Layout is exactly what it sounds like. It is the layout in which lists of your Data Collection Items and is fully customizable using your own HTML and CSS.
By placing a {bb_datacollection} tag on any Web Page, Page Template, or Include File, BlueberryCMS will generate the list of Data Collection Items using the layout you design! First, put this tag on one of your pages.
{bb_datacollection source="Your Collection Name"}
Then edit your list layout under the Content > Data Collections > Edit Collection > Layouts tab. The List View layout will loop this markup until it runs out of items to display. Here's an example of a basic list layout.
<div class="dc-item-container">
<h3>{{dataName}}</h3>
<div class="content">{{dataContent}}</div>
<img src="{{imageUrl}}" alt="{{dataNameNoLink}}">
<p><a href="{{dataUrl}}">Click here to read more!</a></p>
</div>
Detail View Layout
The Detail View Layout is what your website visitors will see when they click on a link to view more details about a Data Item. As shown in the example above, the {{dataName}} tag generates a hyperlink that goes to a web page that shows the details about that particular Data Item. This layout will not appear if "Disabled Detail Page" is checked.
The Page Template used by the Detail View page is determined by what you set under the Settings tab of the Data Collection itself.
Edit View Layout
FUTURE RELEASE - The Edit View Layout will allow you to create a Web Form that will be displayed on the front-end of your website designed for visitor's and users to fill out. Upon submission, the data will be inserted as a Data Collection Item.
Auto Responder
FUTURE RELEASE - This feature, when enabled, automatically sends an email to the person who fills out a front-end Data Collection form displayed to your website.
Customer Permissions
FUTURE RELEASE - This allows for various controls over the front-end form that is displayed to your visitors.
Be sure to check out our Developers Documentation for more in depth resources about Data Collection tags.