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
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
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
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:
$SearchForm
Cheers
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
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
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
Thanks for your advice... I'll give it a try.
regarding the gallery you can find it here
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..
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
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?