Questions answered by this recipe
How can I get page listings in a "dictionary index" format, i.e., segregated by initial letter of the page name?
(:pagelist group=Cookbook fmt=dictindex:) (:searchresults group=Cookbook text=index fmt=dictindex:)
Enable page listings using a "dictionary index" format via fmt=dictindex
- The output can be customized by various $FPLDictIndex...Fmt variables -- see the documentation in the script for details.
- extdictindex.phpΔ is a modified version of this script so that every index letter has an anchor
<a name='$IndexLetter'></a>and that
$FPLDictIndexStartFmtcontains an index
A - B - C - ...where every letter links to the appropriate anchor in the index. Should be useful for a large numer of search results... Nils Knappmeier
- Just modified it to work also with PmWiki 2.0beta39 Klonk
- titledictindex.phpΔ is a modified version of this script. It contains the additions made in
extdictindex.phpbut lists not the pagenames, but the pagetitles defined in the separate files. If no pagetitle is defined the pagename will be displayed. I personally think this is the most universal variant. Klonk
- Modified it to deal better with lowercase titles (also fixed up the whitespaces) Norman Rasmussen
- Modified with some optimizations as suggested by Pm - Klonk
- Unfortunately it is not Valid XHTML 1.0 Transitional (W3C Markup Validation Service: http://validator.w3.org/). Seven errors occured.
- you can change to this
SDV($FPLDictIndexStartFmt,"<p id='dictindexheader'>\$IndexLinks</p>\n<dl class='fpldictindex'>\n"); SDV($FPLDictIndexEndFmt,'</dl>'); SDV($FPLDictIndexLFmt,"<dt><a href='#dictindexheader' id='\$IndexLetterID'>▲</a> \$IndexLetter</dt>\n"); SDV($FPLDictIndexIFmt,"<dd><a href='\$PageUrl' title='\$Group : \$Title'>\$Title</a></dd>\n"); SDV($FPLDictIndexHeaderLink,"\n".'<a href="#$IndexLetterID">$IndexLetter</a>');- She
- you can change to this
- If you have problems with the above version of titledictindex.phpΔ not displaying the index letters in version 2.2.0-beta44 of the wiki (sorry, not verified for other versions) try replacing line 40 with "$pletter = substr($item['=title'],0,1);" (without the quotes). Daniel Rosendorf - Thanks, included this change - Klonk
- toggledictindex.phpΔ is modified from titledictindex.php and displays the list by pagetitles but initially hidden, and each section gets toggled in and out of view by clicking on the letter in the list's header. This script uses elements from togglelink.php, but does not need it to run. ~HansB August 01, 2006, at 10:31 AM
If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".
- FplByDays -- fmt=bydays for pagelists; A custom format for YYYYMMDDHHMM format page names.
See discussion at DictIndex-Talk