Customer Portal: Folder Structure

The Customer Portal incorporates an intuitive, easy-to-navigate file structure that lets you clearly identify the files you can edit. The main directory is called cp, and it includes the following main folders:

  • The core folder: All the non-editable Customer Portal files.
  • The customer folder: The Customer Portal files you can edit, including all pages and custom widget files used on your development site, as well as assets (CSS, images, and themes) and error pages.
  • The generated folder: All staged files and all files you have promoted to your production site.
  • The logs folder: Logs for each staging, promoting, and rollback operation.

Core Folder

The core folder contains all of the underlying Customer Portal code. You cannot add or remove files in this folder, nor can you edit any of the folder names or files.

  • assets: The core/assets folder contains all web assets used by the Customer Portal Administration site, organized in the following subfolders: debug-js, default, ejs, and images. The default subfolder contains the CSS, images, and themes for the pages, templates, and widgets in the reference implementation. You can always use these files to view and revert to the reference implementation.
  • framework: This folder is the core of the Customer Portal code base and contains all view files for the pages and templates. It also contains files and information about version changes, controllers, libraries, models, and utilities.
  • widgets: The widgets folder contains the files for all standard widgets, including controllers, views, CSS, images, logic, and YAML information files. You can use these files to the view the code for the standard widgets.

cp_folder_structure_core

Customer Folder

The customer folder contains all the Customer Portal files you can modify, organized in the following subfolder structure.

  • assets: This folder contains the assets you can add, edit, and delete, including the subfolders css, images, and themes. Assets include all files for your customer portal that are not pages, templates, or widgets, including CSS, JavaScript, images, video, and other rich web media. You can add, remove, edit, and execute files and add subfolders to the assets folder. In addition to the css and images subfolders, the assets folder includes a default subfolder that contains default versions of the asset files provided in the reference implementation. If you make changes to any of the assets and then decide to revert to the standard assets, you can copy them from the default subfolder.

Important Note: With the exception of the themes subfolder, all other files in the assets folder are shared by development and production files. Even if you don’t stage and promote your development pages, changes you make may affect the look and function of your production pages. For example, if production pages call a file in the assets folder and you modify that file in the course of your development work, the change will be immediately visible to your customers.

Important Note: Although all other files in the /cp/customer/assets/ folder are shared between the production and development areas, files in the themes subfolder of /cp/customer/assets/ are used strictly by the development files. When you stage the develop- ment pages, these files are copied to a time-stamped folder in the staging directory and called from that folder. The themes you develop are kept in this isolated sandbox that cannot be accessed by production files. The themes are applied to your production site only when you promote the staged files into production.

  • development: The development folder is your working folder, containing all templates and pages to create and update your customer portal. It contains the following subfolders.
  • error: Contains three editable error pages and splash.html, which is a page displayed to customers when your site is being upgraded. You can edit the splash file to display whatever information you want.

cp_folder_structure_customer

Generated Folder

The generated folder contains two subfolders: production and staging, which mirror the structure of the /cp/customer/development subfolders. The staging subfolder contains the development files that you have staged through the CX Console or the Customer Portal Administration site. Your customers cannot see the files in the staging folder. The production subfolder contains the staged files that have been promoted into production. Those files are visible to your customers. Both subfolders also have a backup subfolder that contains the original source code from the previous staging and promoting activities. The staging folder includes a themes subfolder that is copied from your development site when you stage the development pages. These folders allow the rollback function. None of the files in the generated folder can be edited or deleted. Nor can you add any files.

cp_folder_structure_generated

The logs folder

The logs folder contains logs for every stage, promote, and rollback operation performed on your site as well as a log that documents changes made to Customer Portal files so you can see when and by whom the files were modified.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s