[Radiant] Page behavior tutorial
Sean Cribbs
seancribbs at gmail.com
Sat Mar 29 00:10:08 CDT 2008
Chuck Craig wrote:
> Thanks for the info Sean! Ok here's what I want to do. I'm building a
> website that will require searching the database for books entered in
> the admin section. So far I followed the Link Roll tutorial, but used
> books instead, and was able to add books and display them on a page.
>
> Now I want to create a search box(it will appear on all pages of the
> site) that will take the user to a page to that will simply display
> the results of the books found.
>
> I'm currently working on another project that just uses rails and I've
> implemented searching through the use of a search model and controller
> that return the results. Would my task be done easier if I just added
> a similar model and controller to my current extension ( The one for
> adding and displaying books )?
>
> By the way, the example I've been viewing is the Search extension you
> created
>
> -Chuck
Either strategy is valid but has its benefits and drawbacks. A page
subclass has tighter integration with the front-end design, while a
separate controller has greater flexibilty but a little more challenging
integration. Personally, I would recommend using a combination of
share_layouts and a custom controller. (We used this extensively on
redken.com, just check out the products section for an example) This
allows you to present your results in a design that resembles the rest
of your site while retaining the flexibility of a controller. Also,
while the search extension might be a good starting point, it has a
pretty naive search. Something like Ferret or Sphinx might be a better
solution down the road.
Cheers,
Sean
More information about the Radiant
mailing list