Welcome ,
  1. Home
  2. How to Use Access Level Widgets to Control Content Visibility in PageCarton

PageCarton Documentation



Interested in coding widgets, classes, or methods? Check out the Code section!

How to Use Access Level Widgets to Control Content Visibility in PageCarton


Image

This article explains how to use PageCarton's Access Level Widgets to control content visibility based on user roles, such as content owners, invited users, or administrators. It helps ensure that only authorized users can manage or modify content, thereby improving both usability and security across your website.

Understanding Access Levels

Access levels determine who can see what is on your website. It's important to define which user should be allowed to view the content. Numerical values called AUTH LEVELS are being used to represent different types of users.

Here are the standard access levels commonly used:

Example Use Case:

  • If you only want owners and super users to be able to edit or delete a post, use

object_access_level: [98, 99]

  • If you want all signed-in users to see a button (e.g., 'Comment'), use

object_access_level: [1]\

PageCarton Access Level Widget

This ensures proper visibility control, and also enhances the security of your site by making sure that only users with the appropriate permissions such as the content Owner (98) or Super User (99) can view and interact with these sensitive actions.

Without access control, unauthorized users might see or attempt to perform actions they shouldn't have access to, which can lead to errors or vulnerabilities. Wrapping your content in an access-level condition provides a clean, secure, and professional experience for all users.

  • <widget> If it is not to be used inside another widget.
  • <widget-inner> If it is to be used inside another widget.
  • object_access_level: Limits visibility to users listed.

Example: To Hide an Edit Button from Users and make it visible for website Owner and Admin only.

This ensures that only users with the appropriate roles such as the Owner (98) or Admin (99) can see and interact with the button.

Why This Matters:

By defining and using access levels:

  • You keep sensitive actions secure.
  • You improve the user experience by showing only relevant actions to each user.
  • You avoid cluttering the interface for general visitors.

 

 

← Previous "Explaining the concepts of PageCarton""PageCarton System Requirements" Next →


 

Similar article

 

How to Backup and Restore on PageCarton Photo

How to Backup and Restore on PageCarton

Backing up your PageCarton website helps protect your data against mistakes, server issues, hacking, or accidental deletion. A proper backup allows you to restore your website quickly if anything g...

article
 

 

Multi-Site Manager on PageCarton Photo

Multi-Site Manager on PageCarton

The Multi-Site Manager in PageCarton allows you to manage multiple websites from a single PageCarton installation. With the Multi-Site Manager, each site can have its theme, content, and setting...

article
 

 

How to Create a Form on PageCarton Photo

How to Create a Form on PageCarton

Forms on PageCarton allow you to collect information from website visitors, such as contact details, inquiries, or feedback. Follow the steps below to create a form on your PageCarton website. S...

article
 

 

Creating of Pages on PageCarton Photo

Creating of Pages on PageCarton

Step 1: Log in to the PageCarton Admin Panel 1.     Open your browser. 2.     Visit https://yourdomain.com/pc-admin (For local installation: http://lo...

article
 

 

How to add posts on PageCarton Photo

How to add posts on PageCarton

PageCarton makes it easy to create and publish posts such as blog articles, news updates, or announcements on your website. Follow the simple steps below to add a post successfully. Step 1: Log ...

article