This page offers some advanced technical information about the scope rules.
Your webstore has generally hundreds of unique urls – every category, product, information or system page has own url. It would be an overkill to define content for each unique page. That’s why when you open a page that has no explicitly assigned content in the page builder, the system loads the default blocks that are appropriate for the corresponding page type. For example, the category page type has subcategories block, which is unsuitable for information pages.
When a page is opened the system checks every page builder area (Content, Intro, Footer, Left Column, Right Column) to determine which blocks should be displayed. If the area has no saved blocks, the system checks the inheritance tree to find if there is a parent area to display its blocks.
The inheritance tree is checked from top to bottom until a record in the corresponding page builder area is found. If a record is found, the search is over and its contents are assigned to the area. If no record is found, the default theme blocks for the area area assigned.
For example, when you open the ‘Clothing’ category page in your webstore, the system first checks every area if there is a record for the ‘Clothing’ category (single page scope). If it finds a record, the search is over and the content is displayed. If not, it goes down the inheritance tree to check for general scopes that include this page. The first parent is Level 1 categories (assuming that ‘Clothing’ is level 1), then it checks the next parent – ‘All categories’ and then ‘GLOBAL’. If no record is found, the system loads the default built-in configuration.
Here are the rules that are applied when determining the scope for the corresponding page. Against every scope name is a sample diagram of the inheritance tree.
GLOBAL |
The GLOBAL scope embraces all pages for the corresponding Page Builder area. It is checked for a record right before the built-in defaults. Helpful‘Content’ area has no GLOBAL scope as it is assumed that every page has unique content. |
Home |
Home is the default page that opens when someone visits your store. If there is no record for Home page in the Page Builder area, the system checks for a ‘GLOBAL’ scope record (this dos not apply to the Content area as it has no global scope). |
Categories |
A category is a default OpenCart product listing page, that displays products linked to it. If there is no record for the specific category page in the page builder area, the following inheritance scheme is used to determine the blocks to be displayed:
|
Information/System page |
The information page is a custom content page that is created from the opencart control panel. The system pages are built-in opencart pages, e.g. Account Login. If there is no record for the specific information/system page in the page builder area, the following inheritance scheme is used to determine the blocks to be displayed:
|
Layout |
The layout is an advanced opencart concept that allows you to add content for a group of routes. It can also be used to tag categories and information pages. |
General scopes
The general scopes apply to a group of pages in the store front. They are checked only if there is no ‘single page scope’ record for the current store page. General scopes include all categories, level N categories, global and layout
Single Page scopes
The single page scopes are responsible for a single page (with unique url) in the store front. These are single categories, information and system pages