Webmastersite.net
Register Log In

A to Z categories

Comments on A to Z categories

babrees
Expert

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

Total Topics: 391
Total Comments: 1303
babrees
Posted Aug 13, 2011 - 6:00 AM:

I have a main category which has about 200 sub-cats. I'd like to be able to have an A to Z of just those sub-categories, like the Alphabetic Menu you have for links.

Is there any way I can do this?
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 14, 2011 - 10:34 PM:

Based on scripts.webmastersite.net/w...s/alphabetic-menu-378.html , changing it to search categories:

 <a href = "search.php?action=filter&filled=1&whichtype=categories&namecondition=start&namesearch=A" >A</a> 


So the script for 26 letters would be
<?php
$num = ord('A');
for($x=0; $x<26; $x++)
{
$char = chr($num);
echo '<a href="search.php?action=filter&filled=1&whichtype=categories&namecondition=start&namesearch='.$char.'">'.$char.'</a><br />';
$num++;
}
?>
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.