WSN
Alphabetic Menu
Alphabetic Menu
By (WSN PHP Scripts)
04/25/07 (Edited 02/02/10)

Suppose you wish to have A to Z links on your pages which lead to a list of listings starting with that letter. You can do this by constructing search links, like this:
<a href = "search.php?action=filter&filled=1&whichtype=links&titlecondition=start&titlesearch=A" >A</a>


For the letter B, just change titlesearch=A">A to titlesearch=B">B. To restrict to the current category, tack on &incatid={CATID}.

Remember that custom templates can be applied to any page, so you can make a special search result template and use it by tacking &custom=yes&TID=specialtemplate onto the search URL.

For an automatic list of all 26 English letters:
<?php
$num = ord('A');
for($x=0; $x<26; $x++)
{
$char = chr($num);
echo '<a href="search.php?action=filter&filled=1&whichtype=links&titlecondition=start&titlesearch='.$char.'">'.$char.'</a><br />';
$num++;
}
?>
Details Print Rate Report E-Mail


4.5/5 based on 2 votes. The median rating is 4.

Views: 414 views. Averaging 0 views per day.

Previous Article | Next Article

Features Showcase Purchase Services Resources Support