This module tag is used to access the content within a Data Collection.
This module supports Liquid.
Syntax
{bb_datacollection source="" filter="" sort="" limit="" displayPagination="true" resultsPerPage="" emptyMessage="No items found." collectionName="" layout=""}
Properties
- source - (Required) This parameter identifies the Data Collection from which to pull the data to render on a web page. If left blank, nothing is rendered on the page or within the code.
- filter - These fields and associated values build a filter string as follows:
filter="fieldname1:myValue1 | fieldname2:myValue2"
Options:- dataId - Filter by the system generated ID
- dataName - Filters out an item by name
- dataTags - Filter items according to assigned tags
- dataSubmittedBy - Filter items according to the user who submitted/entered the data collection item
- dataPublishedBetween - Filter items from date and to date
- random - Filters out a random single item. This parameter doesn't require a name:value pairing. Code example: filter="random"
- custom variables - You can use any custom variable set up in the Data Collection. Spaces in variable names must be replaced with an underscore. For example: a text string "My Variable" would be typed in as sort="My_Variable:value"
- sort - These fields can be used for sorting and builds a sort string as follows:
sort="dataName:Ascending | dataPublishedDate:Descending | dataSortOrder:Descending"
Options:- dataId
- dataName
- dataPublishDate
- dataSortOrder
- comments – displays items with the largest number of comments first. Part of future release.
- limit - Set the maximum number of items to return.
- displayPagination - Renders the pagination section when there are more in the data items than the resultsPerPage value.
- resultsPerPage - When displayPagination is set to "true" this number will determine the number of items displayed in a page. Enabled only if displayPagination check box is checked.
- emptyMessage – Your custom value that is rendered. Default text is "No items found.".
- collectionName – Use this parameter to access the Liquid tags. Accessed when layout="" is used.
- showUnexpired - Accepts a true/false value. This parameter is "true" by default and shows all data collection items that have not expired yet.
- showExpired - Accepts a true/false value. This parameter is "false" by default does not show any expired data collection items. Set to "true" if you would like to include items that have expired.
- layout - Renders the module output using:
layout="Default" or layout="List View Layout"
- sets the layout to the Default module layout;layout="My Custom Layout"
- set the layout to use a custom layout template;layout=""
- allows you to code a custom layout right within the web page HTML using Liquid. Ex: {bb_datacollection source="My Collection" layout="" collectionName="myData"} will allow you to use {{myData.Field_Name}}. Switch "Field_Name" with your field names using underscore "_" to replace spaces.
Liquid Tags
{{dataName}}
– Name of the data collection item with a hyperlink to the details.{{dataId}}
– System generated ID for the data collection item.{{dataButton | text: “Your Text”}}
– Renders a hyperlink to the collection item details.- {{dataCommentCount}}– Number of comments for the collection item.
{{dataCounter}}
– Incremental count of the items in the data collection returned.- {{dataDeleteUrl}} – Renders the URL that allows the user to delete a data collection item they previously submitted. Only available in a secure zone.
- {{dataEditUrl}} - Renders the URL that allows the user to edit a data collection item they previously submitted. Only available in a secure zone.
{{dataContent}}
– Content of the data collection item.{{dataPublishDate}}
– Date and time the data collection item was published.{{dataExpiryDate}}
– Renders the expiry date to stop displaying the data collection item.{{dataLastUpdated}}
– Displays the date only the data collection item was last updated.{{dataLastUpdatedTime}}
– Displays the time only the data collection item was last updated.{{dataLastUpdatedDateTime}}
– Displays the date and time the data collection item was last updated.{{dataNameNoLink}}
– Name of the data collection item without a hyperlink.{{dataSortOrder}}
– Ordering weight of the data collection.{{dataTags}}
– Renders a list of Tags that this data collection item is assigned to.{{dataUrlWithHost}}
– Full URL of the data collection item including host.{{dataUrl}}
– Relative URL of the data collection item.{{dataDataSource}}
– Used to link two data collections together.{{dataParentId}}
– Used to identify the parent collection connected to the collection.- {{dataGeoLocation}} - Used to identify whether GEO mapping is enabled.
- {{dataLatLng}} - Latitude and Longitude of the collection item. Format: (LAT,LONG). If GEO mapping is enabled.
- {{dataLatitude}} – Latitude of the collection item. If GEO mapping is enabled.
- {{dataLongitude}} – Longitude of the collection item. If GEO mapping is enabled.
{{dataAddress1}}
– Street address of collection item. If GEO mapping is enabled.{{dataAddress2}}
– Additional street address line for the collection item. If GEO mapping is enabled.{{dataCity}}
– City of collection item. If GEO mapping is enabled.{{dataState}}
– State of the collection item. If GEO mapping is enabled.{{dataZipCode}}
– Zip code of the collection item. If GEO mapping is enabled.{{dataCountry}}
– Country of the collection item. If GEO mapping is enabled.
Related Modules
Attention Business Catalyst Users
There are a couple of things we did to improve on Business Catalyst Web Apps.
-
No More 500 Items Issue
First and foremost, BlueberryCMS® does not have the 500 items issue that Web Apps had. Although any customization in code to work around the BC problem, will need to be updated a little to render correctly in BlueberryCMS®.
-
Improved Data Source Option
Another annoyance with BC Web Apps that always bugged us when creating a website was the "Data Source" selector option. No more simple hyperlink to the other web app item. We give you ALL of the data from any connected Data Collection! We truly connect Data Collections together. Now if you have a collection of books that has a collection of authors, you now will have access to ALL the data about an author right within a books page. Or vice versa. I could see a list of all the books the author wrote with complete details about the books.
-
Unlimited Number of Items
Well "almost" unlimited as we like to say. BC allowed a Web App to contain 20,000 web app items. We don't necessarily have restrictions on the total number of Data Collection items you can have in a single Data Collection. We do have some limits. See System Limits for more details on other limits.
Comments
0 comments
Please sign in to leave a comment.