Documentation

Special pages

Attention! We strongly recommend first to learn more about Sites module REST documentation to understand how the module functions (with REST available in Bitrix24 Self-hosted editions). View this documentation as useful source when working with Bitrix24 Self-hosted editions and find out more details about API and only REST is not enough.

Sites24 module can have only one recycle bin, checkout and personal section page within a single site.

There is no restriction on creating multiple pages, but for the product list page to be aware about shopping cart and in turn, the cart to be aware about checkout page, single instances of these pages must be associated to the 'Special page' entities.

After creating a page and by indicating a marker cart (shopping cart) we can query it at other site pages directly inside block code:

<a href="#system_cart">Shopping cart</a> 

//please note, marker is intentionally set without closing hashtag symbol #

In this case, ID is not used and special page anchors can be indicated beforehand before creating the corresponding pages.

Presently available special page markers:

  • #system_mainpage – main page
  • #system_catalog – catalog main page
  • #system_personal – personal section
  • #system_cart – shopping cart
  • #system_order – checkout
  • #system_payment – payment page (direct payment processing)
  • #system_compare – comparison page

How to assign specific site pages to special page markers? Please, see code example below.

if (\Bitrix\Main\Loader::includeModule('landing'))
{
   // within site ID=1 set for page ID=123
   // spec type "personal lsection"
   \Bitrix\Landing\Syspage::set(1, 'personal', 123);
   
   // or delete association to site, without page
   \Bitrix\Landing\Syspage::set(1, 'personal');
   
   // get all available site system pages with ID=1
   $syspages = \Bitrix\Landing\Syspage::get(1); 
   
   // returns all pages, even from shopping cart,
   // To return only active pages, pass second parameter as true
   $syspages = \Bitrix\Landing\Syspage::get(1, true);
   
   // clear all associations for site with ID=1
   \Bitrix\Landing\Syspage::deleteForSite(1);
   
   // clear all associations for page with ID=123
   \Bitrix\Landing\Syspage::deleteForLanding(123);
}

As a result, single page can be a special page of several types. For example, shopping cart page also can be a order processing page.



© «Bitrix24», 2001-2024
Up