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.

Archive

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

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

CMS Search and Filter


Reply

8 Posts   4668 Views

Avatar
Tim

16 July 2007 at 11:00am Core Development Team, 201 Posts

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 [url=http://en.wikipedia.org/wiki/Taxonomy]taxonomy[/url]

Avatar
Tim

16 July 2007 at 11:00am Core Development Team, 201 Posts

Attached...

Avatar
Tim

16 July 2007 at 11:13am (Last edited: 16 July 2007 11:14am), Core Development Team, 201 Posts

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.

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

Avatar
elijahlofgren

16 July 2007 at 2:19pm Google Summer of Code Hacker, 222 Posts

Hi Tim,

Thanks for the mockup and screenshot.

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

However, as per [url]http://support.silverstripe.com/gsoc/wiki/GSoc07UsabilityElijah[/url] 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

Avatar
Tim

17 July 2007 at 9:43am Core Development Team, 201 Posts

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 [url=http://www.silverstripe.com/web-applications/]portfolio section[/url], that will give you a tase of what is possible

Avatar
Anonymous user

23 July 2007 at 4:13pm 22 Posts

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.

Avatar
elijahlofgren

17 August 2007 at 6:36pm Google Summer of Code Hacker, 222 Posts

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: [url]http://support.silverstripe.com/gsoc/attachment/ticket/74/Add-Site-Search-Filtering-cms-gsoc-r40431.patch[/url]

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

Avatar
Markus

18 August 2007 at 12:29am Google Summer of Code Hacker, 152 Posts

Great work Elijah!