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.

Archive /

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

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

CMS Search and Filter


Go to End


7 Posts   5579 Views

Avatar
Tim

Community Member, 201 Posts

16 July 2007 at 11:00am

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

Avatar
Tim

Community Member, 201 Posts

16 July 2007 at 11:00am

Attached...

Avatar
Tim

Community Member, 201 Posts

16 July 2007 at 11:13am

Edited: 16/07/2007 11:14am

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 :P)

Avatar
elijahlofgren

Google Summer of Code Hacker, 222 Posts

16 July 2007 at 2:19pm

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

Avatar
Tim

Community Member, 201 Posts

17 July 2007 at 9:43am

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

Avatar
elijahlofgren

Google Summer of Code Hacker, 222 Posts

17 August 2007 at 6:36pm

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

Avatar
Markus

Google Summer of Code Hacker, 152 Posts

18 August 2007 at 12:29am

Great work Elijah!