Such blocks contain a form with search string and a button for submitting data to the search result page.
Minimal requirements for this block to be operational:
- Available tag
<form>, query input string
<input>, data submit button.
- Available attribute for selector
'attrs' => [ '.landing-block-node-form' => [ 'name' => 'Search result page', 'attribute' => 'action', 'type' => 'url', 'allowedTypes' => [ 'landing', ], 'disableCustomURL' => true, 'disallowType' => true, 'disableBlocks' => true ] ]
- Optionally, subtype and subtype_params can be added to the blocks description. In this case the attribute Search result page (see para. 2) will include the landing page when a block is added (for user convenience):
'block' => [ 'name' => Loc::getMessage('LANDING_BLOCK_59_2-NAME'), 'section' => array('sidebar', 'other'), 'subtype' => 'search', 'subtype_params' => [ 'type' => 'form', 'resultPage' => 'result' ] ],
Where result is ID for search results page template. When such page is found at the site, it is be added automatically.
User CommentsUser comments are not part of official documentation. Use information provided by other users in the comments at your own risk.
The User Comments section is not to be used as a feature discussion board. Only registered users can post comments. Your comment will be visible once it has been approved by the moderator.