Webmastersite.net
Register Log In

Drop down category box

Comments on Drop down category box

babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Aug 06, 2008 - 8:34 AM:

I'd like to split the drop down box into two - have one for all categories under cat#32 and another for all the other categories. How do I do that please?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 06, 2008 - 11:38 AM:

There are no facilities for creating ad hoc category selectors. Moving to feature suggestions.
webflair
Forum Regular

Usergroup: Customer
Joined: Nov 27, 2006

Total Topics: 187
Total Comments: 465
Posted Aug 07, 2008 - 6:41 PM:

You could do it with toplists though
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Aug 07, 2008 - 9:39 PM:

jayweb wrote:
You could do it with toplists though


Been playing around with this but can't get it to work! Obviously wrong, but my latest attempt was:

 

<form action="{DIRURL}/index.php?action=displaycat&catid={CATID}" method="post">
<select name="catid">
<option value="0">Find a Retailer</option>
<!-- BEGIN TOPLIST 21 -->
<CONFIG>categories,name;id,500,ascending,parent='32',,,0,0,0,0,0,0,,0</CONFIG>
<option value="{catid}">{CATNAME}</option>
<!-- END TOPLIST 21 -->
</select>
<input type="submit" value="Go" class="button" >
</form>



This just produces the message: Non-numeric catid value requested: {catid}

So it is not making the option value the actual id

I would of course also prefer if it were possible to use the rewrite.
webflair
Forum Regular

Usergroup: Customer
Joined: Nov 27, 2006

Total Topics: 187
Total Comments: 465
Posted Aug 08, 2008 - 4:02 PM:

{catid} should be {CATID}
webflair
Forum Regular

Usergroup: Customer
Joined: Nov 27, 2006

Total Topics: 187
Total Comments: 465
Posted Aug 08, 2008 - 4:12 PM:

{catid} should be {CATID}

Anyway, id use this....

<form action="redirecttourl.php">
<select name="catid">
<!-- BEGIN TOPLIST 21 -->
<CONFIG>categories,name;id,500,ascending,parent='32',,,0,0,0,0,0,0,,0</CONFIG>
<option value="{CATID}">{CATNAME}</option>
<!-- END TOPLIST 21 -->
</select>
<input type="submit" value="Go" class="button" />
</form>


This also give a rewritten url
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Aug 08, 2008 - 9:35 PM:

Thanks for spotting that Jayweb!

Unfortunately I still can't get it to work. I tried using the redirecttourl.php before. Now it just goes to "page not found".

When using index.php?action=displaycat&amp;catid={CATID} it just goes to the home page.
webflair
Forum Regular

Usergroup: Customer
Joined: Nov 27, 2006

Total Topics: 187
Total Comments: 465
Posted Aug 09, 2008 - 2:24 PM:

Use my example above, I have tested it and it works
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Aug 09, 2008 - 11:20 PM:

I did try it and that's when it goes to a page not found. Sadly that site is currently down for some reason, but I shall try it again when it is back up - which I really hope is soon!!! :-(
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
#10 - Quote - Permalink
Posted Aug 11, 2008 - 4:13 AM:

Thanks Jayweb! Got it working now smiling face

Had to do a new install and then restore a back up of a couple of days ago. Luckily I keep a series of back ups up to 3 days old!

The drop-down box works a treat :-)
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
#11 - Quote - Permalink
Posted Aug 11, 2008 - 11:44 PM:

Still on this, and it works beautifully :-)

But, can we have it so that it does not need a go button? The user just selects and it goes?
webflair
Forum Regular

Usergroup: Customer
Joined: Nov 27, 2006

Total Topics: 187
Total Comments: 465
#12 - Quote - Permalink
Posted Aug 29, 2008 - 11:25 PM:

Well that's actually quite easy to do Babrees. This time we don't use redirecturl.php, but instead use javascript...

<form action="../">
<select onchange="window.open(this.options[this.selectedIndex].value,'_top')">
<!-- BEGIN TOPLIST 21 -->
<CONFIG>categories,name;id,500,ascending,parent='32',,,0,0,0,0,0,0,,0</CONFIG>
<option value="{CATURL}">{CATNAME}</option>
<!-- END TOPLIST 21 -->
</select>
</form>
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.