The CMain class represents a page.
Every time a new page is created, system creates an instance of this class. You can access the CMain object via the $APPLICATION variable.
| Method | Description |
|---|---|
| ShowTitle | Displays the page title. |
| GetTitle | Returns the page title. |
| SetTitle | Sets the page title. |
| Method | Description |
|---|---|
| ShowCSS | Emits the CSS of a page. |
| GetCSS | Retrieves the CSS of the page. |
| SetTemplateCSS | Assigns the CSS to the component. |
| SetAdditionalCSS | Sets the CSS for the page. |
| Method | Description |
|---|---|
| ShowNavChain | Emits the navigation chain |
| GetNavChain | Returns the HTML code of the navigation chain |
| AddChainItem | Adds an item to the end of the navigation chain |
| Method | Description |
|---|---|
| GetMenu | Returns an instance of the CMenu class. |
| GetMenuHtml | Returns the HTML code which displays the menu of the specified type. |
| GetMenuHtmlEx | Similar to GetMenuHtml but applies different menu template. |
| Method | Description |
|---|---|
| ShowProperty | Displays page properties, with respect to the section properties. |
| GetProperty | Returns the property value of the current page or section. |
| GetPageProperty | Returns the value of a property of the current page. |
| GetDirProperty | Returns the specified property of the current section. |
| GetPagePropertyList | Returns an array of all page properties |
| GetDirPropertyList | Returns an array of the section properties, collected recursively up to the site root. |
| SetPageProperty | Sets the value of the specified property of the current page. |
| SetDirProperty | Sets the value of the property for the current section. |
| ShowMeta | Emits the page property as the META tag. |
| GetMeta | Retrieves the page property decorated in the <meta> tag. |
| Method | Description |
|---|---|
| SaveFileContent | Saves the page to disk. |
| GetFileContent | Retrieves the file contents. |
| GetFileRecursive | Searches for a file recursively up the folder hierarchy. |
| GetFileAccessPermission | Retrieves the access permission of a file or folder |
| SetFileAccessPermission | Sets the access permissions for a file or folder |
| CopyFileAccessPermission | Opies the access permissions of one file or folder to another file or folder. |
| RemoveFileAccessPermission | Deletes the access permissions of a file or folder |
| Method | Description |
|---|---|
| GetUserRight | Returns the access permission assigned to a number of groups. |
| GetUserRoles | Returns array of roles (in the form of a string) assigned to a number of groups. |
| Method | Description |
|---|---|
| GetCurUri | Used to obtain the path and name of the current page relative to the site root |
| GetCurPage | Used to obtain the path and name of the current page relative to the site root, without parameters. |
| GetCurPageParam | Returns the path and name of the current page relative to the site root and optionally modifies (adds or removes) the URL parameters. |
| GetCurDir | Returns the folder of the current page relative to the site root |
| SetCurPage | Used to set the current page and its parameters in the instance of the CMain class. |
| Method | Description |
|---|---|
| ShowPanel | Displays the control toolbar in the public section of the site. |
| GetPanel | Returns the HTML code of the public section control toolbar. |
| AddPanelButton | Adds a button to the control toolbar |
| Method | Description |
|---|---|
| set_cookie | Sets the cookie. |
| get_cookie | Returns the value of a cookie. |
| ShowSpreadCookieHTML | Emits the HTML code indended for spreading cookies among domains. |
| Method | Description |
|---|---|
| IncludeFile | Includes any files within the page body, prologue or epilogue |
| GetTemplatePath | Creates the path to the component relative to the site root from the specified path to component. |
| Method | Description |
|---|---|
| IncludeAdminFile | Includes the specified file with the administrative prologue and epilogue attached. |
| IncludeString | Takes a string and returns the HTML code of the specified text bordered in the frame. |
| GetShowIncludeAreas | Urns true if the button Show include areas is checked. |
| AddBufferContent | Used to create delay functions |
| ShowBanner | Includes the Advertising module and displays a banner of the specified type. |
| GetSiteByDir | Returns an array describing the site defined by the specified path and domain. |
| AuthForm | Displays the authorization form, or includes other components depending on the parameters passed. |
| IsHTTPS | Determines if the current protocol is secured (HTTPS). |
| © 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |