Name for the radio input.
Array
id: Pre-selected page id (value).
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',
));