I'm trying to extending Magento 2.x Search Box, But it's not overriding my module.
My code is:
Learning/CustomSearch/view/frontend/layout/default.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="header-wrapper">
<referenceBlock name="top.search">
<arguments>
<argument name="template" xsi:type="string">Learning_CustomSearch::form.mini.phtml</argument>
</arguments>
</referenceBlock>
</referenceContainer>
</body>
</page>
Learning/CustomSearch/view/frontend/templates/form.min.phtml
<?php
/** @var $this \Magento\Framework\View\Element\Template */
/** @var $helper \Magento\Search\Helper\Data */
$helper = $this->helper('Magento\Search\Helper\Data');
?>
<div class="has-toggle search-sections">
<div class="inner-toggle clearfix">
<div class="block block-search">
<div class="block block-title"><strong><?php echo __('Search'); ?></strong></div>
<div class="block block-content">
<form class="form minisearch" id="search_mini_form" action="<?php echo $helper->getResultUrl() ?>" method="get">
<div class="field search">
<div class="control">
<input id="search"
data-mage-init='{"quickSearch":{
"formSelector":"#search_mini_form",
"url":"<?php echo $this->getUrl('search/ajax/suggest'); ?>",
"destinationSelector":"#search_autocomplete"}
}'
type="text"
name="<?php echo $helper->getQueryParamName() ?>"
value="<?php echo $helper->getEscapedQueryText() ?>"
placeholder="<?php echo __('Search entire store here...'); ?>"
class="input-text"
autocomplete="off"/>
<div id="search_autocomplete" class="search-autocomplete"></div>
<?php echo $this->getChildHtml() ?>
</div>
<!-- .control -->
<button type="submit" value="Zoeken" class="btn btn-search"><?php echo __('Search'); ?></button>
</div> <!-- .field .search -->
<div class="actions"></div>
</form>
</div>
<!-- .block-content -->
</div>
<!-- .block-search -->
</div>
<!-- .inner-toggle -->
</div>
<!-- .search-sections -->
Could you please tell me where I went wrong?
Learning_CustomSearch::form.min.phtml
, but still no luck. could you please post the layout xml code here. see my thread updated.