Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » CMS Search and Filter

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 4514 Views
  • Tim
    Avatar
    Core Development Team
    201 Posts

    CMS Search and Filter Link to this post

    One thing which has annoyed me for the past while is the inability to search the site within the CMS to find words on a given page. This is particularly annoying when dealing with a large number of pages.

    The other ones related issues is the inability to easily filter pages within the CMS. For example, if you wanted to filter the tree to show only pages of type "blog" which have been published "in the past two weeks", there was no way to do it, short of doing somthing custom using GenericDataAdmin

    Attached is a proposed interface to solve these issues.

    An important extension to this would be the ability choose how you want the resulted pages sorted, ie "by date", "by author" or the the current way we do it, by the official site taxonomy

  • Tim
    Avatar
    Core Development Team
    201 Posts

    Re: CMS Search and Filter Link to this post

    Attached...

  • Tim
    Avatar
    Core Development Team
    201 Posts

    Re: CMS Search and Filter Link to this post

    Something else you may (may, because this will randomly crash your browser), it a basic prototype of this using javascript.

    The 'real' version would need to perform a full site search hence would need to use client and server side magic to do this.

    http://test.silverstripe.com/treesearch/ (only tested in Firefox, and it will crash your browser after a few searches )

  • elijahlofgren
    Avatar
    Google Summer of Code Hacker
    222 Posts

    Re: CMS Search and Filter Link to this post

    Hi Tim,

    Thanks for the mockup and screenshot.

    As per, http://www.silverstripe.com/google-summer-of-code-forum/flat/1636?showPost=1859#post1859
    I plan to work on adding search capability to the Site Tree.

    However, as per http://support.silverstripe.com/gsoc/wiki/GSoc07UsabilityElijah I will first be working on "Newsletter system additions" which may take a while. ;)

    > short of doing somthing custom using GenericDataAdmin

    I've seen GenericDataAdmin in the code and wondered about it. Are there any examples of it usage that I might be able to take a look at? I'm curious about it.

    Thanks,

    Elijah

  • Tim
    Avatar
    Core Development Team
    201 Posts

    Re: CMS Search and Filter Link to this post

    Sounds good Elijah - keep me posted as you start work on this

    Re GenericDataAdmin, there is a tutorial request for this, however get an idea of what is possible, take a look at NZCT in our portfolio section, that will give you a tase of what is possible

  • Anonymous user
    Avatar
    22 Posts

    Re: CMS Search and Filter Link to this post

    Yes, having multiple ways to get to the same data would be awesome. And to make it even more flexible, I think the way the pages need to be sorted should be relatively modular. Today we may want year, structural (current sort), but tomorrow we'll want to sort by tags. What will we want in 6 months?

    Perhaps a "SiteTreeSortMethod" array in config.php to specify what you want? If not that, then something like it would be great.

  • elijahlofgren
    Avatar
    Google Summer of Code Hacker
    222 Posts

    Re: CMS Search and Filter Link to this post

    Today I worked for many hours and have added Site Tree search in cms gsoc branch r40431:

    ------------------------------------------------------------------------
    r40431 | elofgren | 2007-08-17 01:25:14 -0500 (Fri, 17 Aug 2007) | 7 lines

    NEW FEATURE: When 'Search' button is clicked show a simple search text input and button which allow for filtering the Site Tree by searching the URL, Title, Menu Title, and Content.
    Also show an 'Add criteria...' drop-down with 'Page Type', 'Status', 'Description', and 'Keywords' options which allow for more fine grained filtering based on columns in the SiteTree table.
    In addition add an 'Edited Since' option which uses a CalendarDatePicker which allows for filtering pages based on when they were last edited.
    NOTE: Pages that have children will always be shown whether they match the filter or not, in case one of their children matches the filter. It would probably be better to switch to a flat
    display of the results.
    More info: http://www.silverstripe.com/google-summer-of-code-forum/flat/2526

    ------------------------------------------------------------------------

    Here are the changes I made: http://support.silverstripe.com/gsoc/attachment/ticket/74/Add-Site-Search-Filtering-cms-gsoc-r40431.patch

    Here is what it looks like (with some extra filter fields added):

    Note: I'm not going to add "the ability choose how you want the resulted pages sorted" since I only have 1 more day of GSoC coding and I need to work on other stuff. Sorry I didn't get to this earlier, but I think what I have here is pretty good and can be easily extended. ;)

    Good night,

    Elijah Lofgren

  • Markus
    Avatar
    Google Summer of Code Hacker
    152 Posts

    Re: CMS Search and Filter Link to this post

    Great work Elijah!

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