Jump to content

[FREE TUTORIAL] Adding ajax and instant search to the top horizontal menu


NemoPS

Recommended Posts

  • 4 weeks later...

+1 it works but with little issue and im confused a bit...

when i change the blocktopmenu.php file the digit "1" apears at the top left side of my template

and the

</head>
	<body id="index" class="index">

markup at the page source is red. any clue? i try to change the file encoding and nothing. when i revert the blocktopmenu.php file without the mod the "1" digit disapear. weird!

Link to comment
Share on other sites

  • 1 month later...

Hi Nemo1, thank you for the tutorial(all of them). I have aside question - How could I enable the "search sign" in the search box? For some reason I dont have it. Tried to uninstall and reinstall the block, didnt help - still not there. Any advise would be much appreciated.

 

https://www.dropbox.com/s/68iuhk226hb89vh/search_box.jpg

Edited by mnmak (see edit history)
Link to comment
Share on other sites

Try adding this to the form in blocktopmenu.tpl

 

<input class="search_query" type="search" id="search_query_top" name="search_query" placeholder="{l s='Search' mod='blocksearch'}" value="{$search_query|escape:'html':'UTF-8'|stripslashes}" />

 

But I am not sure it will be properly styled, you probably need some css changes as well

Link to comment
Share on other sites

  • 2 months later...

Hi. This is great but I can´t seem to find the ajax search in the tpl. files. I use ps 1.6.0.9 and the blocksearch-istantsearch.tpl does not exist. I have blocksearch-top.tpl and blocksearch.tpl but none of those have the ajax and instant search

Link to comment
Share on other sites

  • 1 year later...

+1 it works but with little issue and im confused a bit...

when i change the blocktopmenu.php file the digit "1" apears at the top left side of my template

and the

</head>
	<body id="index" class="index">
markup at the page source is red. any clue? i try to change the file encoding and nothing. when i revert the blocktopmenu.php file without the mod the "1" digit disapear. weird!

 

Hi, to prevent appearing this little "1" in index template you can change script part:

 

extraParams: {

ajaxSearch: 1,

id_lang: {$cookie->id_lang}

}

 

to:

 

extraParams: {
ajaxSearch: '1',
id_lang: {$cookie->id_lang}
}
 
and no1 appears nomore... ;)
Link to comment
Share on other sites

  • 4 weeks later...

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...