Search format

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:

  1. Available tag <form>, query input string <input>, data submit button.
  2. Available attribute for selector <form>.
       'attrs' => [
          '.landing-block-node-form' => [
             'name' => 'Search result page',
             'attribute' => 'action',
             'type' => 'url',
             'allowedTypes' => [
             'disableCustomURL' => true,
             'disallowType' => true,
             'disableBlocks' => true
  3. 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 Comments

User 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.
© «Bitrix Inc.», 2001-2021, «Bitrix Inc.», 2021