Jump to:

23479 Posts in 18951 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Need help modifying generic views search results

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: 292 Views
  • woodb2
    Community Member
    48 Posts

    Need help modifying generic views search results Link to this post

    I'm using the generic views module to display search results for my Deliverable class. The module was working great until the requirements of the project changed. The deliverables were just items the users added to their project one by one. Now each project has a default set of deliverables (43 of them) that is automatically added to their project.

    When displaying the deliverables I don't want to display what I call "Blank Deliverables" in my search results (most deliverables are now blank because of automatically adding them to the project). In my generic views CollecitonController_Results.ss I have condition set that only displays BlankDeliverables == 0. This does filter out all the blank deliverables.

    The problem: The first page of my results (from MoreThanOnePage function) doesn't display anything. If I click in page 2 of the results I start to see the deliverables. I'm guessing this is because my search results contains many more items than what I'm displaying.

    I believe I need to somehow remove these blank deliverables from the search results (instead of filtering them out by not displaying them in the template).

    Also, I noticed that if I use any of the filters in the form, I don't have a blank first page (only with the default search results).

    Any help would be appreciated.

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.