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.

General Questions /

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

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

ModelAdmin and Search problem


Go to End


2 Posts   1323 Views

Avatar
Simkim

Community Member, 9 Posts

31 July 2010 at 6:50am

Edited: 31/07/2010 6:51am

Hi,

I'm using ModelAdmin in my CMS, and I have a problem with the search form. I have a properties table, linked with a models table who is linked with a unit table. I mean, one properties has many models, and each model has many units.

The ModelAdmin has 3 managed models (properties, models and units), and the problem is when I have to search in units. I would like to search within the properties, and show the units that belongs to the property. I have try to do this with searchcontext, but this affects the other two searches as well (properties and models).

I don't know if there is any way to do that. Any help is really appreciated!

Thank you very much

Mercedes

Avatar
Simkim

Community Member, 9 Posts

31 July 2010 at 8:42am

Hi again,

I've found the solution by myself, I've been trying really complicated things instead the simplest of all: add in the searchable_fields the Models.PropertiesID

So it works!