Welcome ,
  1. Home
  2. Widgets

PageCarton Documentation



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

Widgets

By default, whenever PageCarton wants to output something to the browser, it does this through widgets. A widget serves as a bridge that links the PageCarton core to the browser.


Image

Adding widgets require one to have a capability of writing PHP code. Widgets are PHP classes that extend the base PageCarton_Widget class. A Widget should have an "init" method that the PageCarton core would call to run the widget process. The easiest way to create a widget is to create the file from the PageCarton Admin Panel. To create a widget file, go to:

PageCarton Admin Panel > Plugins > My Plugins > "New Widget"

This will create the PHP File that would contain the widget class in the right directory. It will also create the "init" method outputting some demo code. You need to customize this file to suite the task you want the widget to accomplish. All Widget files should be saved in "/pagecarton/sites/*/application/modules".

Currently, you cannot edit the widget file from the browser; you need to edit the file using your favorite code text editor.

 

 

 

← Previous "How to Backup and Restore on PageCarton""How to Create a Form on PageCarton" Next →


 

Similar Documentation 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
 

 

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

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

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 t...

article