#1 July 4, 2012 12:17am

Garibaldi
Member
Registered: July 2, 2012
Posts: 1

Searching Pages

Hello BigTree Team,

I am interested in using BigTree for a new site I am developing that will have quite a few pages of content. One key feature of the site will be an AJAX-driven search pane that will search the articles for keywords entered by a user and display a list of matching articles. Is there any type of search functionality built into BigTree?

Thanks!

Offline

#2 July 5, 2012 9:47am

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 949

Re: Searching Pages

You can take two approaches to search in BigTree.  The first is the "search" method in the BigTreeModule class from which all module data classes are sub-classed:

http://www.bigtreecms.org/code-referenc … ule.search

You can just pass in the user's search term as the first parameter and the method will return anything in that module that contains those terms.

If you need to search Pages content instead of a module's content you'll want to use the BigTreeAdmin class's "searchPages" method.  For this method you'll want to pass in the first parameter as your user's search query and the second parameter as an array of fields to search (the default is only the navigation title).  To search the page's content, page title, and navigation title you'd want to the second parameter to be: array("nav_title","title","resources")

The other way that we commonly use is Google's Custom Search -- it leverages Google's index to provide really relevant search results and you can setup custom searches to only search a specific part of your site:
http://www.google.com/cse/

Offline

#3 February 18, 2013 1:53pm

WilliamBerry
Member
Registered: February 18, 2013
Posts: 2

Re: Searching Pages

Curious about Search in BigTree. Is there an out-of-the-box Web site search included in BigTree? I do see there is a blog search included.

Offline

#4 February 18, 2013 1:55pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 949

Re: Searching Pages

We generally use Google's Custom Search (http://www.google.com/cse/) for sites we build on BigTree. BigTree has search methods for pages and modules (generally used in the admin area), but you're always going to get better search results through someone who specializes in search so we don't believe the investment is worth building a deeper search for the front-end users.

Offline

#5 February 18, 2013 3:23pm

WilliamBerry
Member
Registered: February 18, 2013
Posts: 2

Re: Searching Pages

OK, great thank you Tim. I am impressed with SEO ability for pages, something many tools tend to ignore.

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.