21286 Posts in 5733 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 438 Views |
-
Custom Search - Categories / Products

1 November 2011 at 3:42am Last edited: 1 November 2011 3:52am
I have around 20-25 products under couple of categories. Looking for some sort of example code showing custom search resulting category / product pages only.
Hope someone can help.
-
Re: Custom Search - Categories / Products

1 November 2011 at 9:57am
This might help.
http://www.silverstripe.org/all-other-modules/show/6641?start=24
I downloaded the code from the 4th page here and worked very well.
Cheers
Scott -
Re: Custom Search - Categories / Products

1 November 2011 at 10:06pm Last edited: 1 November 2011 10:41pm
Cheers Scott,
I did look at the code. I have not implemented categories and products as DOM (DataObjectManager).
My requirement is to implement custom search snippet on the category/product pages when searched will get results only from product pages (Title / Content).
There will be another website search which will only show results from simple pages excluding product pages.
Is that possible? Sorry very new to SilverStripe.
-
Re: Custom Search - Categories / Products

2 November 2011 at 8:36am
Take a look at this tutorial on how to extend and create your own page types:
http://doc.silverstripe.org/sapphire/en/tutorials/2-extending-a-basic-site
Once you have got that working, you should be able to search your new product type custom fields. By default the normal search only searches the title and content fields.
By default the custom search will search "all" pages and any classes you tell it to search. Once you have this working I can tell you how to modify this.
Hope that helps.
Regards
Scott
| 438 Views | ||
|
Page:
1
|
Go to Top |

