Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 2:
Search function on mobile site

 

 


juggler
New User

Aug 30, 2009, 11:56 PM

Post #1 of 9 (6018 views)
Shortcut
Search function on mobile site Can't Post

I've got my mobile site working nicely Smile - except for the search function.

Can I create a new fiile called searchmobile.cgi and just change the references within the new searchmobile.cgi to searchForm.html to searchFormMobile.html and searchResults.html to searchResultsMobile.html??

I've tried to do that - and then done 'publish all', but all I get for searchmobile.cgi is a blank page.

(I hard coded the search form call in my mobile version of the categorymenu template to call the searchmobile.cgi)

All I really need is the ability to change the template that shows the search results from my full site template to my mobile 'lite' template that has fewer images, etc, etc

Can anybody help with how I can get the search working on the mobile site?


Donna
Staff / Moderator


Aug 31, 2009, 1:48 PM

Post #2 of 9 (5979 views)
Shortcut
Re: [juggler] Search function on mobile site [In reply to] Can't Post

Hi Juggler,

You can't create copy of the search.cgi, but you don't need to -- you can just add the search fields onto any standard HTML page. Go to your search.cgi page (you can use your searchFormMobile template, but replace any placeholders with their actual values) and view the source, and you can copy & paste it onto any new page.

Then, add in a line like this to your search form after the <form> tag:

<input type="hidden" name="template" value="searchEngine/searchResultsMobile.html">

I hope this helps. :)

Donna

--
support@interactivetools.com


juggler
New User

Aug 31, 2009, 8:41 PM

Post #3 of 9 (5968 views)
Shortcut
Re: [Donna] Search function on mobile site [In reply to] Can't Post

Thank you - that did the trick!!! Smile


Harvey
User

Sep 19, 2009, 9:12 AM

Post #4 of 9 (5728 views)
Shortcut
Re: [Donna] Search function on mobile site [In reply to] Can't Post

Hello Donna. This is not working for me. I have my mobile pages and I want the search box to return results in the template based on mobile search result page. But I can't seem to figure out where to change that in the publishing rules or the templates. Everything points to the searchbox, which is itself like a blackbox!

thanks


Donna
Staff / Moderator


Sep 21, 2009, 2:13 PM

Post #5 of 9 (5678 views)
Shortcut
Re: [Harvey] Search function on mobile site [In reply to] Can't Post

Hi there,

There's no change in the publish rules, you just add the line I mentioned into your (new) mobile search box.

So, instead of using the default search box, you'll create your own custom search box, and add the template line above so that it uses your custom search results template as well.

Does that make sense? :)

Donna

--
support@interactivetools.com


Harvey
User

Sep 21, 2009, 3:22 PM

Post #6 of 9 (5671 views)
Shortcut
Re: [Donna] Search function on mobile site [In reply to] Can't Post

Hi. It's not making sense to me at all. I don't get it. There is no specific widget for the search box so I can't replace it with one of my own because there is nothing in my installation suggesting that I can reach this file or even clone and modify it. All I can change is the result template.

thanks


Donna
Staff / Moderator


Sep 24, 2009, 4:25 PM

Post #7 of 9 (5423 views)
Shortcut
Re: [Harvey] Search function on mobile site [In reply to] Can't Post

Hi Harvey,

No, it's not a widget, it's just plain HTML -- on an external search page like what you want to setup, the only part of it that's Article Manager is where the <form> tag goes.

So, what you end up doing is leaving Article Manager out of it, and creating your own form. In that form, there are two important lines you'll need:

<form action="/path/to/search.cgi" method="post">
<input type="hidden" name="template" value="searchEngine/mobileSearchResults.html">

The rest of the HTML is just regular form HTML. Make sure the names match up with the field names you're searching. If you want, you can just copy & paste the existing code from your current search page.

Then, make a copy of the default search results template, and modify it to have the look & feel you want. Because of the line you added above, Article Manager will use this when it's generating the search results, instead of the default template.

Does that make sense? If you're still having trouble, feel free to drop me an email at support@interactivetools.com with a link to what you've got so far and I can guide you from there. :)

Donna

--
support@interactivetools.com


Harvey
User

Sep 26, 2009, 9:11 AM

Post #8 of 9 (5364 views)
Shortcut
Re: [Donna] Search function on mobile site [In reply to] Can't Post

Hi Donna. What you're saying is not making any sense. My search box is not set up the way you describe it at all. I don't have an absolute link to the search.cgi widget. I have an old install from 2005 that was upgraded to AM2. Perhaps that's why I just don't see what you're talking about. I have none of the options that you mentioned above and I can't replicate what you're describing.

This is what is in my code to access the search box

<form action="$settings.searchUrl$" method="post">

There is no link to any search.cgi widget anywhere in all my templates.

It's just not an option.

Thanks


(This post was edited by Harvey on Sep 26, 2009, 9:14 AM)


Donna
Staff / Moderator


Sep 28, 2009, 2:31 PM

Post #9 of 9 (4993 views)
Shortcut
Re: [Harvey] Search function on mobile site [In reply to] Can't Post

Hi Harvey,

That's exactly right -- that's what you would have on the "main" site. Then, on your mobile site, you would have a different search box setup for your mobile search.

Instead of having the current:

<form action="$settings.searchUrl$" method="post">

...you would hardcode that link to the search URL.

<form action="/path/to/search.cgi" method="post">

All that placeholder does is automatically populates the field with the path to the search URL, but it only works on pages that are generated by Article Manager. If you're creating a second search, which I'm assuming is what you're trying to do, as that's what the original post was about. (If you're trying to do something different... let me know, because we're going down the wrong road here!)

Does that make more sense?

It might be a little easier if you can show me what you've got so far, and I can point you in the right direction. Try filling out a support request form, and we can see what the next step is. :)

https://www.interactivetools.com/support/email_support.cgi

Donna

--
support@interactivetools.com