Jump to content
Singular

Creating URL to return search results

Recommended Posts

Hey Joe,

Your site is what's awesome! Cool! I haven't seen it for a long time, and it looks great. Thanks for letting me know about the spuds and sending the link again.

 

Jill

 

Thanks Jill,

An idea just came to me. Actually it's more of an inquiry. Is there any way that searches can be permalinked. Not the actual results, because they would be everchanging depending on the frequency of your events turning over. I mean the query. If I want to search "Sculpture" in my database of art contests, I get a list. Could that query be saved so that I could have links of popular search terms underneath the search spud. If a user clicked one of the popular search terms, a current list of events that met that search requirement would come up.

 

thanks,

Joe

Share this post


Link to post
Share on other sites

Hi Joe,

I split out your last post into a new topic, so it'll be easier to find later.

 

If I understand correctly what you're asking, you can create your own URL that will return the results you want. It's actually kind of convoluted, but it's possible. Essentially, you build a REST-style URL, except you have to URL encode the parameters.

 

In your case, to use the search parameter to show only events that contain the string "sculpture", your URL would be as the ones below. (There should be no spaces in the code, but I wrapped the lines of code to keep them from getting too long on the screen.)

 

http://www.asingularcreation.com/Lists/art-contests.htm
?trumbaEmbed=calendar%3Dasingularcreation%26search%3Dsculpture

 

And you can use any text you want for the link text. For example:

<a href="http://www.asingularcreation.com/Lists/art-contests.htm
?trumbaEmbed=calendar%3Dasingularcreation%26search%3Dsculpture">Sculpture events</a>

Try it here.

 

If you wanted to search for a multiple-word string, you'd encode the space character, too. Also, I'm not able to test this from here, but I wonder if you need the fully qualified URL (if I'm using the correct terminology), or if you can just start the URL with your page's name (leave off the http://www.asingularcreation.com/lists/ part to make it a relative path)...

 

Here's another topic that talks about it in case you want more info. This one uses the Trumba hosted site: Topic 1361

 

And here's a URL encoding page on the blooberry.com site that I find useful:

URL encoding

 

I hope this is what you're looking for. Sorry it's so complicated.

 

Jill / Trumba UA

Share this post


Link to post
Share on other sites
Hi Joe,

I split out your last post into a new topic, so it'll be easier to find later.

 

If I understand correctly what you're asking, you can create your own URL that will return the results you want. It's actually kind of convoluted, but it's possible. Essentially, you build a REST-style URL, except you have to URL encode the parameters.

 

In your case, to use the search parameter to show only events that contain the string "sculpture", your URL would be the ones below. (There should be no spaces in the code, but I wrapped the lines of code to keep them from getting too long on the screen.)

 

http://www.asingularcreation.com/Lists/art-contests.htm
?trumbaEmbed=calendar%3Dasingularcreation%26search%3Dsculpture

 

And you can use any text you want for the link text. For example:

<a href="http://www.asingularcreation.com/Lists/art-contests.htm
?trumbaEmbed=calendar%3Dasingularcreation%26search%3Dsculpture">Sculpture events</a>

Try it here.

 

If you wanted to search for a multiple-word string, you'd encode the space character, too. Also, I'm not able to test this from here, but I wonder if you need the fully qualified URL (if I'm using the correct terminology), or if you can just start the URL with your page's name (leave off the http://www.asingularcreation.com/lists/ part to make it a relative path)...

 

Here's another topic that talks about it in case you want more info. This one uses the Trumba hosted site: Topic 1361

 

And here's a URL encoding page the the blooberry.com site that I find useful:

URL encoding

 

I hope this is what you're looking for. Sorry it's so complicated.

 

Jill / Trumba UA

 

Jill,

You are amazing. I love you for this.

 

Joe

Share this post


Link to post
Share on other sites

Hi Joe,

I can't believe we don't have a blushing smiley here! : ) I'll just have to say thanks instead, and I'm glad if this info helps!

 

Cheers!

 

Jill

p.s. I heard a rumor that these URLs might be permalinked in the future. Let's hope so!

Share this post


Link to post
Share on other sites

Hi Jill,

I am not sure if there is a glitch in the search feature or maybe no one ever brought it to your attention, but there is an issue when using a link for specific search results. Here is an example. I have added links on the side of my page under the search spud called "Popular Search Terms". If you were to do a search for art contests with cash prizes by typing it in the search spud, the url of the page does not change; the search results are received and the functionality of the calendar works well. Everything is good. However, if you click the search term "Contests with Cash Prizes", you still get the search results, but the url is changed and that throws off the functionality of the calendar. Even if you clear the search results, the url does not change.

 

Here is my web page. Let me know if this is something you guys can fix.

 

thanks,

Joe

Share this post


Link to post
Share on other sites

Hi Joe,

I see what you're describing about the URL not changing when you clear the search results, but I'm not positive I'm catching all of the other behavior that's thrown off. Can you tell me what else is thrown off? Also, what browser are you using?

 

Jill / Trumba UA

Share this post


Link to post
Share on other sites
Hi Joe,

I see what you're describing about the URL not changing when you clear the search results, but I'm not positive I'm catching all of the other behavior that's thrown off. Can you tell me what else is thrown off? Also, what browser are you using?

 

Jill / Trumba UA

 

Hi Jill,

 

Normally, when you type in a search word and get the result, the calendar is uneffected. But when you use a link, the url is different and the calendar only pulls up events if they fall into the search criteria. So, even though the calendar has the same highlighted days, if you scroll over a day that is highlighted, but doesn't have an event that falls within your search criteria, you get a thin solid line.

 

I am using IE, but I will try Firefox and Opera when I get home. I don't think it is a browser issue, but a functionality issue.

 

talk soon,

Joe

Share this post


Link to post
Share on other sites

Hi again, Joe,

I see what you're describing, and you're right, it's not a browser issue. I know what's going on.

 

What I see now that I didn't tell you originally is that you'll have to add that same search parameter to your date finder spud code. Otherwise it's not going to reflect the view that the main calendar is showing. Right now it's showing that there are events on that date, because there are, but the main calendar spud says otherwise. Because the main calendar is being displayed with hard-coded parameters, it can't give the date finder any events that don't match the parameters. I've run into this with creating a custom mix-in view, and it makes sense once you realize that's what's going on. I'm sorry I didn't think about other spuds on the same page as the filtered main calendar spud when I originally gave you the code for creating the view.

 

I'm wondering whether the URL behavior is an intentional side-effect as well. Clicking the Clear link doesn't change the URL, because technically you're still using that search-result view. If you were to click Refresh, it would display that search-result view, just as when you hit refresh on the normal view after doing a search, it displays the normal view. All of the spud interaction goes on at spud level, which is independent of the container-page/browser level. When you mess with the URLs, you're working at the container-page level. This is a tricky one.

 

Jill / Trumba UA

Share this post


Link to post
Share on other sites

Hi Joe,

That teaserBase variable is determined to catch up with you this week. : ) Putting a main calendar spud on the page would resolve it, but to use the spud the way you want here, add a teaserBase. In your other topic I added a link to info about how to use it. Let me know if I can clarify anything.

 

Jill

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×