Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

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.

Data Model Questions /

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

site search return results from sitetree, needs property of actual page object


Go to End


1341 Views

Avatar
Ben_W

Community Member, 80 Posts

29 January 2010 at 1:29pm

I have a implemented the site search, however it seems to me that the search is only searching the sitetree table, mainly the title of the page. in the page result template, I would like to display additional property of the page object, since not all my page object uses 'Content' field, as we all know that any additional field we declared in the page object will be stored in the seperate table and linked with sitetree by ID. For instance, my article page object uses field 'Details' instead of the default 'Content' field, in the search result I can't get $Details.LimitWordCount(50) to work.

Is there a way to get $Details in the Page_results.ss? if not, is there other better search algorithms available in silverstripe?