CMS: Working with the Dataset Mode and Collection Permissions

3 min read
Control whether elements connected to your dataset can read the collection, write to the collection, or both with the dataset mode. From the collection's permissions & privacy settings, determine who can perform certain actions with your collection. 

Dataset modes

The dataset mode determines what actions can be done between the connected elements and your collection. 

From the dataset settings, you can choose from the following dataset modes:
  • Read: Elements on your page can read and display content from your collection. Site visitors cannot modify the content in your collection. 
  • Write: Elements on your page cannot display content from the collection. Visitors can interact with user input elements and a submit button to add content to your collection. However, visitors cannot edit the content in your collection. 
  • Read & Write: Elements on your page can read and display content from your collection. Visitors can interact with user input elements and a submit button to add or edit content in your collection. 

Collection permissions

Set your collection's permissions and privacy to control the type of content you store and who can view and edit it. 

Choose from the following preset collection permissions: 
  • Public: Anyone can view content from this collection. Use this option for collections that will have your own content you want to display. 
  • Form Submissions: Anyone can submit content to this collection. Use this selection for collections that will store user input. 
  • Custom: Create custom permissions for this collection. This option allows you to set specific permissions if you find that none of the other permission types work for you.
  • Private: None of the content in a Private Data collection will appear on your site. Only the admin can access the content in this collection. Use this selection for collections that will hold content only the site admin can view.
  • Member-Generated: Only members can submit or modify content in this collection. Use this selection for collections that will store user input that the user will be able to edit. 
  • Members Only: Only members can view content from this collection. Use this selection for collections that will store content available only to your site's members. 
  • Member Submission: Only members can submit content to this collection. Use this selection for collections that will store user input only from your site's members. 

Example

Let's say we have a collection that saves user comments. We want to allow anyone to read the comments, but only site members to add comments. To do so, we'll use a collection to save the comments, a form built from input elements, and a table for displaying the comments. 

We begin by setting our collection permissions to the Member-Generated preset. That preset allows anyone to read the contents of the collection, but only site members can create content, and only site members can update and delete content they themselves created. 

Next we add page elements and define dataset connector mode settings:
  • Page content: Form for entering comments.
  • Dataset mode: Write. Restricts what can be done on the page to adding new content.
  • Collection permissions: Restricts who can add the content to users with the Site Member role

  • Page content: Table for displaying comments.
  • Dataset mode: Read. Restricts what can be done on the page to reading the collection content.
  • Collection permissions: Doesn't place any restriction on who can read that content, so anyone can.

Note that the collection permissions also allow site members to update or delete the content that they themselves created. However, since we haven't created a page with a dataset that is set to Read & Write mode, there is no way for them to make use of those permissions.

We could change the dataset on the page with the form to Read & Write. We would have to add some functionality to the page, typically in the form of buttons, so that users can click through to reach their own comment, delete a comment, or edit a comment. Learn how to allow users to manage live site content

Did this help?

|