Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 2:
Search results "Next" button problem

 

 


4blacksheep
User

Dec 6, 2007, 12:43 PM

Post #1 of 6 (3639 views)
Shortcut
Search results "Next" button problem Can't Post

In one area in the site I have a general search form to search all the categories.
I also have on some pages a different search form that will search that category only.

all works well except when I hit the "Next" button on the search results page.

If I add this code &categoryNum=$category.num$ then the general search does not work, I get this error:
Error: expecting a value (quoted string, bareword, or function) in where condition: "...cle.categoryNum IN ( ***ERROR*** [unknown placeholder..." at c:/websites/innovativemob/artman2/modules//IT/DB/WhereParser.pm line 486.

and when I don't add that code the one category search does not keep that category in the Next button.

How can I resolve this issue?

Thanks,
Roni


Jake
Staff


Dec 7, 2007, 2:20 PM

Post #2 of 6 (3633 views)
Shortcut
Re: [4blacksheep] Search results "Next" button problem [In reply to] Can't Post

Hi Roni,

Thanks for posting!

This problem is occurring because you can't associate particular categories with search results pages. If you're using different template files for each set of these search results, you could hard-code the category number instead of using the $category.num$ placeholder, since this won't work on search results pages.

Let us know if you have any other questions. Smile
-----------------------------------------------------------
Cheers,
Jake Marvin - Product Specialist
support@interactivetools.com

[hr][i][url "http://www.interactivetools.com/consulting/"][b]Hire me![/b][/url]
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with [url "http://www.interactivetools.com/consulting/"][b]Priority Consulting[/b][/url].[/i]


4blacksheep
User

Dec 10, 2007, 9:45 AM

Post #3 of 6 (3610 views)
Shortcut
Re: [Jake] Search results "Next" button problem [In reply to] Can't Post

Could you help me with the code?
I understand how to set up different search results templates.

Thanks,
Roni


Jake
Staff


Dec 11, 2007, 10:17 AM

Post #4 of 6 (3593 views)
Shortcut
Re: [4blacksheep] Search results "Next" button problem [In reply to] Can't Post

Hi Roni,

Thanks for your reply!

The following instructions are for the search pages that only look through one category.

When you set up the different search results templates, you'll want to use the following code as a guideline for your next/previous links:


Code
<a href="$settings.searchurl$?action=search&amp;page=$articleList.prevPageNumber$&amp;perpage=$articleList.perpage$&amp;template=YOUR_CUSTOM_TEMPLATE_NAME&amp;includeSubcats=$articleList.includeSubcats$&amp;categoryNum=SPECIFIC_CATEGORY_NUMBER">prev page</a> 

<a href="$settings.searchurl$?action=search&amp;page=$articleList.nextPageNumber$&amp;perpage=$articleList.perpage$&amp;template=YOUR_CUSTOM_TEMPLATE_NAME&amp;includeSubcats=$articleList.includeSubcats$&amp;categoryNum=SPECIFIC_CATEGORY_NUMBER">next page</a>


In the links above, you'll need to replace two parts of the link to get the to work correctly:

YOUR_CUSTOM_TEMPLATE_NAME: Needs to be the custom template name you set up for this category

SPECIFIC_CATEGORY_NUMBER: Needs to be the corresponding category number for the category you're currently searching. You can find this out if you go to the "Categories" section of the Article Manager interface. If you click on one of the modify links, the category number will be revealed as a number at the end of the URL in your address bar.

You'll also need to add a line of code to the pages that you're executing the search from. This line of code will need to be added so that the correct template is used:


Code
<input type="hidden" name="template" value="YOUR_CUSTOM_TEMPLATE_NAME">


Give that a try and let us know if you have any other questions about this. Smile
-----------------------------------------------------------
Cheers,
Jake Marvin - Product Specialist
support@interactivetools.com

[hr][i][url "http://www.interactivetools.com/consulting/"][b]Hire me![/b][/url]
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with [url "http://www.interactivetools.com/consulting/"][b]Priority Consulting[/b][/url].[/i]


agape1546
New User

Mar 24, 2009, 12:59 PM

Post #5 of 6 (2424 views)
Shortcut
Re: [Jake] Search results "Next" button problem [In reply to] Can't Post

I am having the same problem as well. I am getting the following error when I click on the next page:

Error: expecting a value (quoted string, bareword, or function) in where condition: "...cle.categoryNum IN ( ***ERROR*** [unknown placeholder..." at /home/agape25/public_html/cgi-bin/artman2/modules//IT/DB/WhereParser.pm line 486.

I don't recall changing my template so I don't know what happened. My template shows the following:


<!-- templateIf : $articleList.nextPageNumber$ > $articleList.thisPageNumber$ -->

<a href="$settings.searchurl$?action=search&page=$articleList.nextPageNumber$&perpage=$articleList.perpage$&template=$articleList.template$&categoryNums=$categoryNums$&includeSubcats=$articleList.includeSubcats$">next &gt;&gt;</a>

In addition, I like to know where I can download the original templates from ARTMAN 1

Thanks

Pat



In Reply To



ross
Staff / Moderator


Mar 25, 2009, 11:24 AM

Post #6 of 6 (2410 views)
Shortcut
Re: [agape1546] Search results "Next" button problem [In reply to] Can't Post

Hi there.

What you'll want to do here is remove the following bit from your code "&categoryNums=$categoryNums$".

That only works if you are creating category indexes and I suspect the page you get the error on is actually a global index.

Give that a shot and let me know how you make out :).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Product Specialist
support@interactivetools.com

Hire me!  Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/