Latest Register Log In

+ Advanced Search

Alphabetic Menu

Alphabetic Menu
By
04/25/07 (Edited 02/04/14)

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++;
}
?>




Description Creating A to Z sections of listings.
Rating
Views 667 views. Averaging 0 views per day.
Similar Listings