Get the address of the special page on the site landing.syspage.getSpecialPage

We are still updating this page

Some data may be missing here — we will complete it shortly.

Scope: landing

Who can execute the method: any user

The method landing.syspage.getSpecialPage returns the address of a special page on the site. The example shows how to get a link to the personal section page of the site.

try
        {
        	const response = await $b24.callMethod(
        		'landing.syspage.getSpecialPage',
        		{
        			siteId: 1391,// Site ID
        			type: 'personal',// Type of special page
        			additional: {// Optional array of additional parameters to be added to the URL
        				SECTION: 'private'
        			}
        		}
        	);
        	
        	const result = response.getData().result;
        	console.info(result);
        }
        catch(error)
        {
        	console.error(error);
        }
        
try {
            $response = $b24Service
                ->core
                ->call(
                    'landing.syspage.getSpecialPage',
                    [
                        'siteId' => 1391, // Site ID
                        'type' => 'personal', // Type of special page
                        'additional' => [ // Optional array of additional parameters to be added to the URL
                            'SECTION' => 'private'
                        ]
                    ]
                );
        
            $result = $response
                ->getResponseData()
                ->getResult();
        
            echo 'Success: ' . print_r($result, true);
            // Your required data processing logic
            processData($result);
        
        } catch (Throwable $e) {
            error_log($e->getMessage());
            echo 'Error getting special page: ' . $e->getMessage();
        }
        
BX24.callMethod(
            'landing.syspage.getSpecialPage',
            {
                siteId: 1391,// Site ID
                type: 'personal',// Type of special page
                additional: {// Optional array of additional parameters to be added to the URL
                    SECTION: 'private'
                }
            },
            function(result)
            {
                if(result.error())
                {
                    console.error(result.error());
                }
                else
                {
                    console.info(result.data());
                }
            }
        );
        

How to Use Examples in Documentation