Jump to:

22999 Posts in 11854 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » Custom Search - Categories / Products

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 701 Views
  • ss-ss
    Avatar
    Community Member
    15 Posts

    Custom Search - Categories / Products Link to this post

    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.

  • Scott Farmer
    Avatar
    Community Member
    35 Posts

    Re: Custom Search - Categories / Products Link to this post

    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

  • ss-ss
    Avatar
    Community Member
    15 Posts

    Re: Custom Search - Categories / Products Link to this post

    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.

  • Scott Farmer
    Avatar
    Community Member
    35 Posts

    Re: Custom Search - Categories / Products Link to this post

    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

    701 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.