Name for the radio input.
Set to true if you want to select multiple pages. Default false.
An array, or an array of array iff multiple is true, containning:
id: Pre-selected page id (value). model: Nos\Page\Model_Page
Array
Context: | Context of the pages displayed in the page selector. |
---|
Height of the renderer. Default is 150px.
Width of the renderer. Default is none.
Parameters: |
|
---|---|
Returns: | The <input> tag with JavaScript to initialise it |
Displays a page selector renderer in a standalone manner.
Adding a page in a CRUD form configuration:
<?php
return array(
'label' => __('Location:'),
'renderer' => 'Nos\Page\Renderer_Selector',
'renderer_options' => array(
'height' => '250px',
),
);
Displaying a media selector:
<?php
echo Nos\Page\Renderer_Selector::renderer(array(
'input_name' => 'my_page',
'selected' => array(
'id' => 2, // ID of the previously selected page
),
'treeOptions' => array(
'context' => 'main::en_GB',
),
'height' => '250px',
));