Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued/Classic Products: Article Manager 1:
Category list in search box

 

 


kezza
User

Aug 14, 2006, 11:19 PM

Post #1 of 10 (2726 views)
Shortcut
Category list in search box Can't Post

I have a problem with the category list not appearing in the search pulldown on certain pages. The code used is identical on all pages :

<option value="">All Categories</option>
$category_pulldown$
</select>

The list of categories appears on the search results page (generated by search.cgi) but doesn't appear on any other pages on the site. I'm sure there's a rational explanation for this but I can't figure what it would be!

Anyone have any suggestions please??!!
Kerry


Donna
Staff / Moderator


Aug 16, 2006, 10:32 AM

Post #2 of 10 (2718 views)
Shortcut
Re: [kezza] Category list in search box [In reply to] Can't Post

Hi Kezza,

Thanks for your email. :)

The $category_pulldown$ only works on specific templates, such as the search_form.html. Usually, the search form is included in other pages via an SSI. The default SSI for this is:

<!--#include virtual="$publishdir_virtualpath$$file_search$" -->

Take a look at the admin guide for a list of what placeholders work on which templates:

http://www.interactivetools.com/docs/articlemanager/admin/index.html

I hope this helps! Let me know if you have any other questions or concerns. :)

Donna

--
support@interactivetools.com


kezza
User

Aug 16, 2006, 1:45 PM

Post #3 of 10 (2712 views)
Shortcut
Re: [Donna] Category list in search box [In reply to] Can't Post

Hi Donna ... thanks for that. Unfortunately I'm not clear on what I will need to do here .... I'm OK with including the SSI on all pages but I'm assuming I will also need to make some other modifications so that $category_pulldown$ actually gets populated with the categories??
Kerry


ChetW
Staff


Aug 17, 2006, 10:19 AM

Post #4 of 10 (2703 views)
Shortcut
Re: [kezza] Category list in search box [In reply to] Can't Post

Hi,

Thanks for the post!

What you will need to do really depends on what you are trying to accomplish, if for example you are trying to create a category search dropdown then the code on the default "search_form.html" template file will work well for you.

The default code on the "search_form.html" template file looks like this:


Code
  
<table border=0 cellspacing=0 cellpadding=3 width=100%>
<tr>
<td class="bg_search_box">
<form action="$url_search$" method="post">
<input type="text" name="keyword" size=12>
<input type="submit" value="Go"><br>
<select name="cat" style="font-size: 10px; letter-spacing: -0.05em">
<option value="">All Categories</option>
$category_pulldown$
</select><br>
<div align=center><span class="advancedsearch_link"><a href="$url_search$">Advanced Search</a></span></div>
</td></form>
</tr>
</table>


However if you are trying to create a dynamic category dropdown menu instead of using the default category list you may want to try editing your "category_list.html" template file to look something like this:


Code
<select> 
<!-- template insert : $category_list$ -->
<!-- templatecell : row_depth1 -->
<option>$cat_name$</option>
<!-- /templatecell : row_depth1 -->
</select>


What you may want to do is let me know what it is you are hoping to achieve. Once I have a better understanding of your goal I will be happy to lend a hand in setting things up for you. :)

I look forward to hearing back from you!
Cheers,
Chet Woodside - 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]


kezza
User

Aug 18, 2006, 12:44 AM

Post #5 of 10 (2699 views)
Shortcut
Re: [ChetW] Category list in search box [In reply to] Can't Post

Hi Chet - thanks for your reply. I'm still not clear on what needs to be done but I think the best thing is if you could take a look at the site. A log in is required so I'm going to email you separately with the information. Regards Kerry
Kerry


kalish
User

Aug 18, 2006, 6:24 AM

Post #6 of 10 (2689 views)
Shortcut
Re: [ChetW] Category list in search box [In reply to] Can't Post

Hi, everyone, sorry, to take advantage of this thread, i would like

to know, if it is possbile, how to construct an drop down menu,

let say, with the select html tag, but instead to show all

the categories list, i need to show only one. Its a kind of

filter to one category, to show in a html drop down fashion.

Is this possible? can you refer me to some other post here

with explanation about this?

Thnks in advance!


MikeB
Staff / Moderator


Aug 19, 2006, 2:32 PM

Post #7 of 10 (2674 views)
Shortcut
Re: [kalish] Category list in search box [In reply to] Can't Post

Hi Kalish,

Thanks for posting! Smile

From what you've mentioned it sounds like you're just looking to output a search form somewhere on your site that will allow users to search through just one category.

If this is the case then you'd just want to hardcode that one category choice so you'd end up using a bit of code that looks like this:


Code
<table border=0 cellspacing=0 cellpadding=3 width=100%>  
<tr>
<td class="bg_search_box">
<form action="/artman/exec/search.cgi" method="post">
<input type="text" name="keyword" size=12>
<input type="submit" value="Go"><br>
<select name="cat" style="font-size: 10px; letter-spacing: -0.05em">
<option value="">All Categories</option>
<option value="X">Category Name</option>
</select><br>
<div align=center><span class="advancedsearch_link"><a href="/artman/exec/search.cgi">Advanced Search</a></span></div>
</td></form>
</tr>
</table>


This code should work on any page on your site and the only thing you'd need to change would be the option value and the name of the one category that you'd like people to be able to search for.

I hope this helps and if you have any other questions feel free to let me know! Smile

Cheers,
Mike Briggs - 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]


kalish
User

Aug 21, 2006, 9:36 PM

Post #8 of 10 (2639 views)
Shortcut
Re: [MikeB] Category list in search box [In reply to] Can't Post

thnks, Mike , very clear, and i see your point.

It`s possible to make a select html drop down dynamic?

what i`m trying to do here, is to list values in

a select, directly from de database, without the

need from my client to hardcore that drop down on the html page.

I heard about the publishcron.cgi script, is possible

to use it and generate that select and options?

thnks!


ChetW
Staff


Aug 22, 2006, 2:39 PM

Post #9 of 10 (2632 views)
Shortcut
Re: [kalish] Category list in search box [In reply to] Can't Post

Hi,

Thanks for your post!

If I understand correctly you are looking to have one small bit of code call in this select dropdown dynamically for you.
Is this correct?

If so you could call in your serch template through an SSI, however you would still need to have actually coded the select dropdown in an exteranl template file to start with.

What you may want to do is provide me with a few more details on what it is you are looking to accomplish. Once I have a better idea of your goals, I will be happy to help guide you towards your best options.

I look forward to hearing back from you Kalish?
Cheers,
Chet Woodside - 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]


kalish
User

Aug 23, 2006, 6:38 AM

Post #10 of 10 (2617 views)
Shortcut
Re: [ChetW] Category list in search box [In reply to] Can't Post

Thnks Chet for your time.

Ok, what i would like to accomplish here is to make a select drop down

dynamically generated.

let say, i have a category A, this category, have some sub-categories, like

A: a

A: b

A: c

etc.

how can i do, to show, just sub-categories in this form:

<select name="select">
<option value="a">a</option>
<option value="b">b</option>
<option value="c">c</option>
</select>

but when the user insert a new subcategory in AM, in this category, automatically,

the new subcategory, appears in the option list. This select list

is going to be, inside a form html tag, in order to do a search and

shows the results for this particular subcategory.

is that possible?

thnks