21308 Posts in 5737 Topics by 2603 members
| Go to End | Next > | |
| Author | Topic: | 2350 Views |
-
Search not working

16 August 2011 at 7:22pm
Hi,
For some reason the search function isn't working... Is there a module I've got to install or is there a function I need to enable in SS?
URL to the site is..
Kind regards,
Andy
-
Re: Search not working

16 August 2011 at 11:05pm Last edited: 16 August 2011 11:18pm
Hi,
check if you have this line in your /mysite/_config.php:
FulltextSearchable::enable();and if you have this in your template where the search form should appear:
$SearchFormCheers
Edit: Don't forget to rebuild the database by visiting http://yoursite.com/dev/build after adding Fulltext... to your _config.php
Edit2: This link might also help: http://doc.silverstripe.org/sapphire/en/tutorials/4-site-search -
Re: Search not working

17 August 2011 at 3:43am
Still not working.... I've added FulltextSearchable::enable(); where you said it should be.. I've also checked the template page.ss which now looks like this
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><% base_tag %>
$MetaTags
<link rel="shortcut icon" href="/favicon.ico" /></head>
<body><div id="Wrapper">
<div id="Header">
$SearchForm
<h1><span>Christina French</h1>
<p class="tagline">Artist & Tutor</p>
<input type="text" class="search" value="Search" />
</div>
<div id="Nav">
<% include Navigation %>
</div>$Layout
<div class="clear"></div><div id="Footer">
<% include Footer %>
</div></div>
</body>
</html>Any ideas why it's still not working?.. Cache has been flushed 3 times now,
Regards,
Andy
-
Re: Search not working

17 August 2011 at 5:36pm
Hi,
i am not sure if i can help, but try plasing the $SearchForm just under the <body> & test it, it may be conflectiong with something else above it in the code!!.. give it a try...... For now, i Need your help!!.. i saw your website, What gallery did you use (Gallery page).. i really need it.. Can you give me the link to that module..
Thank you
-
Re: Search not working

19 August 2011 at 11:35pm
Thanks for your advice... I'll give it a try.
regarding the gallery you can find it here
-
Re: Search not working

20 August 2011 at 5:16am
thank you.. i am using the gallery now.. its the best.. but i need to get it to do the following:
if there is ONLY one album, Do not show albums list!!
can it be done.. -
Re: Search not working

4 September 2011 at 5:40pm
Anybody have any ideas what I may be doing wrong with this search issue?
What page do I place the $SearchForm line?... I've currently placed it in:
mysite/themes/wine/templates/page.ss
It's currently the first line after the body tag
-
Re: Search not working

4 September 2011 at 9:30pm
The reason it doesn't work, is that your searchform isn't a form at all. it's just a simple textinput without any submit action:
<div id="Header">
<h1><span>Christina French</span></h1>
<p class="tagline">Artist & Tutor</p>
<input class="search" value="Search" type="text">
</div>so for some reason placing $SearchForm in your template seems to only return that single field. How is your searchform created? Did you create a SearchForm() method yourself, or use some custom template?
| 2350 Views | ||
| Go to Top | Next > |



