XF 2.0 Add search box on sidebar

how'd you manage ?

I managed to get this into sidebar
View attachment 181972


Here is my HTML code for the widget I made, hope this help!

HTML:
<div class="block">
    <div class="block-container">
        <h3 class="block-minorHeader"><i class="fa fa-search" aria-hidden="true"></i>SEARCH</h3>
    <div class="block-body block-row">
    <form action="{{ link('search/search') }}" method="post" class="menu-content" data-xf-init="quick-search">
        <!--[XF:search_menu:above_input]-->
        <div class="menu-row">
            <xf:if is="$searchConstraints">
                <div class="inputGroup inputGroup--joined">
                    <xf:textbox name="keywords"
                        placeholder="{{ phrase('search...') }}"
                        aria-label="{{ phrase('search') }}"
                        data-menu-autofocus="true" />
                    <xf:select name="constraints"
                        class="js-quickSearch-constraint"
                        aria-label="{{ phrase('search_within') }}">

                        <xf:option value="">{{ phrase('everywhere') }}</xf:option>
                        <xf:foreach loop="$searchConstraints" key="$constraintName" value="$constraint">
                            <xf:option value="{$constraint|json}">{$constraintName}</xf:option>
                        </xf:foreach>
                    </xf:select>
                </div>
            <xf:else />
                <xf:textbox name="keywords"
                    placeholder="{{ phrase('search...') }}"
                    aria-label="{{ phrase('search') }}"
                    data-menu-autofocus="true" />
            </xf:if>
        </div>

        <xf:csrf />
    </form>
    </div>
    </div>
</div>
 
Back
Top Bottom