UseModWiki | RecentChanges | Preferences

Functions : GetPageDirectory

Simple utility function to help us find where some files are located.

If the page id is 'Alabama' for example, this will return 'A'. This might be in the context of looking for the page file (.db), the cache file (.htm), the keep file (.kp), etc. All of these directories are organized into convenient subdirectories in this fashion.

 Returns: A,B,C... or 'other'

 Uses : $id?

 Calls: uc()

sub GetPageDirectory {

  my ($id) = @_;

  if ($id =~ /^([a-zA-Z])/) {
    return uc($1);
  return "other";


UseModWiki | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited May 13, 2004 11:05 am by (diff)