Jump to content

How to place an image or text after the quick search box


Recommended Posts

1) you can try another html box module like content box, or alter theme .tpl file

2) optionally some paid modules like extended html box pro, but i will not focus on this method.

 

 

so, regarding to point 1, i will describe modification of the theme below.

open file: /modules/blocksearch/blocksearch-top.tpl

 

there you can find a code similar to:

<div id="search_block_top" class="col-sm-4 clearfix">
	<form id="searchbox" method="get" action="{$link->getPageLink('search', null, null, null, false, null, true)|escape:'html':'UTF-8'}" >
		<input type="hidden" name="controller" value="search" />
		<input type="hidden" name="orderby" value="position" />
		<input type="hidden" name="orderway" value="desc" />
		<input class="search_query form-control" type="text" id="search_query_top" name="search_query" placeholder="{l s='Search' mod='blocksearch'}" value="{$search_query|escape:'htmlall':'UTF-8'|stripslashes}" />
		<button type="submit" name="submit_search" class="btn btn-default button-search">
			<span>{l s='Search' mod='blocksearch'}</span>
		</button>
	</form>
</div>

before last </div> code enter your contents, for example:
 

<div id="search_block_top" class="col-sm-4 clearfix">
	<form id="searchbox" method="get" action="{$link->getPageLink('search', null, null, null, false, null, true)|escape:'html':'UTF-8'}" >
		<input type="hidden" name="controller" value="search" />
		<input type="hidden" name="orderby" value="position" />
		<input type="hidden" name="orderway" value="desc" />
		<input class="search_query form-control" type="text" id="search_query_top" name="search_query" placeholder="{l s='Search' mod='blocksearch'}" value="{$search_query|escape:'htmlall':'UTF-8'|stripslashes}" />
		<button type="submit" name="submit_search" class="btn btn-default button-search">
			<span>{l s='Search' mod='blocksearch'}</span>
		</button>
	</form>
<div class="clearfix col-lg-12">
{l s='this is my custom text' mod='blocksearch'}
<img src="http://domain.com/picture.jpg" />
</div>
</div>

i added this:

<div class="clearfix col-lg-12">
{l s='this is my custom text' mod='blocksearch'}
<img src="http://domain.com/picture.jpg" />
</div>
Link to comment
Share on other sites

  • 2 weeks later...

Hi Vekia,

Thank you for the fast reply and sorry I give my feedback so late.

I put your code in the blocksearch-top.tpl file where you said but it didn't work. Nothning broke but it didin't show at all.

Below is the code I have in the file, any suggestions how to make it work? I prefer the text option.



 

<!-- Block search module TOP -->
<div id="search_block_top">
	<form method="get" action="{$link->getPageLink('search', true)|escape:'html'}" id="searchbox">
		<p>
			<label for="search_query_top"><!-- image on background --></label>
			<input type="hidden" name="controller" value="search" />
			<input type="hidden" name="orderby" value="position" />
			<input type="hidden" name="orderway" value="desc" />
			<input class="search_query" type="text" id="search_query_top" name="search_query" value="{$search_query|escape:'html':'UTF-8'|stripslashes}" />
			<input type="submit" name="submit_search" value="{l s='Search' mod='blocksearch'}" class="button" />
		</p>
	</form>

</div>
{include file="$self/blocksearch-instantsearch.tpl"}
{/if}
<!-- /Block search module TOP --> 
Link to comment
Share on other sites

  • 3 weeks later...

Hi again :)

I just found out why your code didn't work with me - because I inserted Cyrillic characters. Is there any way to get around this?

Thanks!
 

 

1) you can try another html box module like content box, or alter theme .tpl file

2) optionally some paid modules like extended html box pro, but i will not focus on this method.

 

 

so, regarding to point 1, i will describe modification of the theme below.

open file: /modules/blocksearch/blocksearch-top.tpl

 

there you can find a code similar to:

<div id="search_block_top" class="col-sm-4 clearfix">
	<form id="searchbox" method="get" action="{$link->getPageLink('search', null, null, null, false, null, true)|escape:'html':'UTF-8'}" >
		<input type="hidden" name="controller" value="search" />
		<input type="hidden" name="orderby" value="position" />
		<input type="hidden" name="orderway" value="desc" />
		<input class="search_query form-control" type="text" id="search_query_top" name="search_query" placeholder="{l s='Search' mod='blocksearch'}" value="{$search_query|escape:'htmlall':'UTF-8'|stripslashes}" />
		<button type="submit" name="submit_search" class="btn btn-default button-search">
			<span>{l s='Search' mod='blocksearch'}</span>
		</button>
	</form>
</div>

before last </div> code enter your contents, for example:
 

<div id="search_block_top" class="col-sm-4 clearfix">
	<form id="searchbox" method="get" action="{$link->getPageLink('search', null, null, null, false, null, true)|escape:'html':'UTF-8'}" >
		<input type="hidden" name="controller" value="search" />
		<input type="hidden" name="orderby" value="position" />
		<input type="hidden" name="orderway" value="desc" />
		<input class="search_query form-control" type="text" id="search_query_top" name="search_query" placeholder="{l s='Search' mod='blocksearch'}" value="{$search_query|escape:'htmlall':'UTF-8'|stripslashes}" />
		<button type="submit" name="submit_search" class="btn btn-default button-search">
			<span>{l s='Search' mod='blocksearch'}</span>
		</button>
	</form>
<div class="clearfix col-lg-12">
{l s='this is my custom text' mod='blocksearch'}
<img src="http://domain.com/picture.jpg" />
</div>
</div>

i added this:

<div class="clearfix col-lg-12">
{l s='this is my custom text' mod='blocksearch'}
<img src="http://domain.com/picture.jpg" />
</div>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...