Home » Topics » Pods 1.x » How do I set up a search ?
How do I set up a search ?
This topic contains 19 replies, has 9 voices, and was last updated by Guil 1 year, 7 months ago.
-
AuthorPosts
-
October 15, 2009 at 6:30 pm #161253
Crucial for sure! What kind of errors are you getting back? You may be placing it before you call the pod…
I’ve come up with my own solution for passing search values through a url, and tried to be as detailed as possible with my documentation:
http://pods.uproot.us/codex/using-_pods_url_variable_-functions-to-create-your-own-search
http://pods.uproot.us/codex/date-range-search-using-_pods_url_variable_-function
Hopefully that will get you started!
October 15, 2009 at 6:32 pm #161254PS – There’s no styling on this site, but you can still see the functionality of the final product: http://www.jbrickman.com/rokict/event
October 15, 2009 at 10:29 pm #161255Hi JB !
Thanks for replying. I have read that thread, but it looked so huge and intimidating I was hoping to start somewhere a bit less daunting, but I suppose I’ll just have to dive in . . .
By the way, your site is exactly the sort of functionality I’m after. If I can put those functions in a sidebar I’d be set.
Are those filter parameter just columns within a single pod (as I hope!), or is each filter dropdown filtering a separate pod ?
thanks
October 15, 2009 at 10:41 pm #161256@jbrickman – Looks good to me
October 15, 2009 at 11:18 pm #161257All the drop down filters you see are pick columns that reference other pods.
October 16, 2009 at 12:01 am #161258So you can’t search or filter your data unless they’re in separate pods ?
October 16, 2009 at 7:29 am #161259My eyes are watering. That just can’t be the only way to set up a decent search.
Search information on this site goes from almost nothing:
$Record->getFilters();To the work by jb, which is surely wonderful, but a bit much for a first bite.
In between there’s just a mass of half-useful fragmented forum posts.
Maybe this site is some sort of "rat in a maze" experiment in human perserverance ?
There’s got to be something else. Please ….
October 16, 2009 at 8:54 am #161260Actually, my method is roughly what $Record->getFilters(); does, it’s just all coded on the back end by the Matt for you. It’s my understanding that they’re adding to this code for future releases, and search will become more full featured.
But, as far as I can tell, our concepts are pretty much the same. Use a form to pass search values through the url.
I know, it’s a lot of work, and I spent quite a bit of time grilling the forums looking for that easy copy and paste answer…
October 16, 2009 at 10:02 am #161261Thanks for staying with me JB, using Pods I’m constantly flipping between "very impressed" and "confused despair".
So…
In step one do I save that as a .js file ? What should it be called, where does it go in relation to the other elements ? Or do I just add the javascriptt to some existing element ?
October 16, 2009 at 10:27 am #161262@downsouth – Let’s take a step back. You mentioned that you were getting errors when using getFilters(). Which errors?
October 16, 2009 at 5:16 pm #161263Thanks Logikal. I have got the filter box to appear, but that’s all – I don’t know how or what or where to add to it to get a result.
Nor do I know what items can be filtered. I read that dates are a problem, but then see various date-based filters ( I need date filters ). Likewise I wonder whether I can only filter pick-based columns, or ordinary columns as well. If so, how do I pull the values ? And are there "helper-style" mathematical functions that can be applied, such as adding values from a particular field across multiple records ?
And if I want to put the filter in the sidebar, how is that done ? And how about setting up "pre-defined" filters to common queries so people can just click on a button?
Your video tutorial part one showed everything so well I’ve sailed past there feeling very happy indeed. But filtering the result is really the key to actual real-world use isn’t it ?
I also very much appreciate your reply in the other thread here: http://pods.uproot.us/forums/general-discussion/774/
But in the same way I was floundering before your first video, I find I’m floundering here. I can see these bright baubles floating around me but just can’t see how they’re all put together.
JB’s post here:
http://pods.uproot.us/codex/using-_pods_url_variable_-functions-to-create-your-own-search
seems very good, but it is tantalizingly short of specifics. Such as whether the javascript is saved as a file or put into a template etc. I know I’m a beginner here, but I am capable of deducing the method if presented with the complete process.
I’ve been doing a lot of shouting, weeping & petulant foot-stamping on this, but only because I can see how good Pods is and am determined to use it. And any material produced to show how this works will surely be of permanent use to the community and perhaps eliminate umpteen forum questions as well as capturing & retaining new users.
October 17, 2009 at 5:21 pm #161264Thanks for the feedback. Any other details I’m missing that you think would be helpful so I can improve the tutorial for future users?
October 17, 2009 at 6:38 pm #161265I hestitate to post this, but since you asked…..
step one:
In step four part 2 you talk about the javascript in the header of the site ? So I just copy and paste this somewhere into the header.php file ?
- in this URL:
/where-pods-is-located/pod-page-where-you-want-the-results-to-display?’; - I’ve got my main project list page here:
mysite.com/projects?type=projects&search=
So I’m unsure what the "where pods is located" would be ? I don’t seem to have that part at this level.
But the page name here needs to match what we create in step 3 I think ? So if I decide in step 3 to call the page "analysis", then the URL here would be:
mysite.com/analysis. Is that right ?step two:
- After changing the form and keyname fields to the appropriate names, does this html just drop in wherever I want the search form ? For example, I could put this code in the sidebar of the site ?
step three:
- I create a pod page called "analysis"
- Much of your code example here I find a bit confusing. But I could probably follow it if there was a complete page example. If you listed the pod names and page names etc, and then just showed the final page code
step four
- If the search form is outside the pod environment then I must hardcode all the pick column values. This is confusing. Does this mean if I’ve located my search form html in the sidebar then I need to attend to this hardcoding problem to avoid the blank field issue ? If so then there doesn’t seem to be a solution presented, just a recommendation for a mySQL call code ?! Yikes, this sounds bad.
I’ve got a big list of projects I want to filter (about 100 on the list page), so would my html search form need to go at the top of the list page then ? So does that mean I should insert the search form html in the pod list page ?
Or am I getting this wrong and there is an easy way to avoid these issues and have the search form in the sidebar ? (Which would be much better)
-
is the {@id} meant to be called that, or are you indicating I should be picking up an id name from somewhere ?
-
When we’re creating a new page here, this is a second new page is it ? We already created a results page in step 3 (which I called analysis), but this is something else again ? You call it a search page, but how is this used ? We have the form html already inserted and have created a results page. I’m confused about what this actually is.
That’s it !
January 20, 2010 at 12:52 am #161266@jbrickman I’d be interested in reading your solution to this problem. Do you have it posted else where on the web? The links on this page(as with a lot of links on this site) don’t seem to be working anymore.
February 24, 2010 at 3:30 am #161252My pods database is looking good. Now it’s time for the crucial element – making it deeply searchable.
I’ve read all lots of threads on the forums, but just can’t find the most simple "how to get started" instructions.
There’s this code:
<?php echo $Record->getFilters(); ?>
But no matter where I put it, I get errors.There’s lots of forum threads, but nothing on getting started.
Pod search in the sidebar – fantastic ! Just what I want. But no detail at all:
http://pods.uproot.us/forums/general-discussion/436/
Then there’s this, which seems to indicate I need to build a "search page" ?!
http://pods.uproot.us/forums/general-discussion/671/
Can anyone offer some basic "how to get started" instructions please ?
thanks
- in this URL:
-
AuthorPosts
You must be logged in to reply to this topic.