TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
SectionViewHelper Class Reference
Inheritance diagram for SectionViewHelper:
AbstractMenuViewHelper AbstractViewHelper

Public Member Functions

 initializeArguments ()
 
 render ()
 
- Public Member Functions inherited from AbstractViewHelper
 setRenderingContext (\TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
 
 injectReflectionService (\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService)
 
 prepareArguments ()
 

Protected Member Functions

 findBySection ($pageUid, $type= '', $column= '')
 
- Protected Member Functions inherited from AbstractMenuViewHelper
 getPageConstraints ($includeNotInMenu=false, $includeMenuSeparator=false)
 
 getPageUids (array $pageUids, $entryLevel=0)
 
 renderChildrenWithVariables (array $variables)
 
 getTypoScriptFrontendController ()
 
- Protected Member Functions inherited from AbstractViewHelper
 callRenderMethod ()
 
 getLogger ()
 
 registerRenderMethodArguments ()
 

Protected Attributes

 $escapeOutput = false
 
- Protected Attributes inherited from AbstractViewHelper
 $controllerContext
 
 $objectManager
 

Detailed Description

A view helper which returns content elements with 'Show in Section Menus' enabled

By default only content in colPos=0 will be found. This can be overruled by using "column"

If you set property "type" to 'all', then the 'Show in Section Menus' checkbox is not considered and all content elements are selected.

If the property "type" is 'header' then only content elements with a visible header layout (and a non-empty 'header' field!) are selected. In other words, if the header layout of an element is set to 'Hidden' then the element will not be in the results.

= Example =

<ce:menu.section pageUid="1" as="contentElements"> <f:for each="{contentElements}" as="contentElement"> {contentElement.header} </f:for> </ce:menu.section>

<output> Content element 1 in page with uid = 1 and "Show in section menu's" enabled Content element 2 in page with uid = 1 and "Show in section menu's" enabled Content element 3 in page with uid = 1 and "Show in section menu's" enabled </output>

Definition at line 47 of file Menu/SectionViewHelper.php.

Member Function Documentation

findBySection (   $pageUid,
  $type = '',
  $column = '' 
)
protected

Find content with 'Show in Section Menus' enabled in a page

By default only content in colPos=0 will be found. This can be overruled by using $column

If you set property type to "all", then the 'Show in Section Menus' checkbox is not considered and all content elements are selected.

If the property $type is 'header' then only content elements with a visible header layout (and a non-empty 'header' field!) is selected. In other words, if the header layout of an element is set to 'Hidden' then the page will not appear in the menu.

Parameters
int$pageUidThe page uid
string$typeSearch method
string$columnRestrict content by the column number
Returns
array

Definition at line 110 of file Menu/SectionViewHelper.php.

References AbstractMenuViewHelper\getTypoScriptFrontendController(), and GeneralUtility\intExplode().

Referenced by SectionViewHelper\render().

initializeArguments ( )

Initialize ViewHelper arguments

Returns
void

Definition at line 61 of file Menu/SectionViewHelper.php.

Member Data Documentation

$escapeOutput = false
protected

Definition at line 54 of file Menu/SectionViewHelper.php.