Jump to:

23355 Posts in 17838 Topics by 2862 members

General Questions

SilverStripe Forums » General Questions » ModelAdmin and Search problem

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: 709 Views
  • Simkim
    Avatar
    Community Member
    9 Posts

    ModelAdmin and Search problem Link to this post

    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

  • Simkim
    Avatar
    Community Member
    9 Posts

    Re: ModelAdmin and Search problem Link to this post

    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!

    709 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.