Sections ​
- Type
- Class
- Namespace
- craft\web\twig\variables
- Inherits
- craft\web\twig\variables\Sections
- Since
- 3.0.0
- Deprecated in
- in 3.0.0
Class Sections variable.
Public Methods ​
Method | Description |
---|---|
getAllSections() | Returns all sections. |
getEditableSections() | Returns all editable sections. |
getSectionByHandle() | Returns a section by its handle. |
getSectionById() | Returns a section by its ID. |
getTotalEditableSections() | Gets the total number of sections that are editable by the current user. |
getTotalSections() | Gets the total number of sections. |
getAllSections()
​
Returns all sections.
Arguments ​
Returns ​
getEditableSections()
​
Returns all editable sections.
Arguments ​
Returns ​
getSectionByHandle()
​
Returns a section by its handle.
Arguments ​
$handle
(string)
Returns ​
getSectionById()
​
Returns a section by its ID.
Arguments ​
$sectionId
(integer)
Returns ​
getTotalEditableSections()
​
Gets the total number of sections that are editable by the current user.
Returns ​
getTotalSections()
​
Gets the total number of sections.