From: Matthew M. <ma...@tu...> - 2003-01-05 15:33:23
|
I see no problem with implementing this. I am using subdirectories with my templates. The way I have been doing this for the processTemplate function is including the template directory along with the name. But that, obviously, wouldn't work with listTemplates. So, developers please indicate if you want this change or offer suggestions. Note that if unless we move the subdirectory variable to the third parameter, a search and replace will be needed. +1 -- Matthew McNaney Internet Systems Architect Electronic Student Services Appalachian State University Phone: 828-262-6493 phpwebsite.appstate.edu ess.appstate.edu > Hi all! > > I submitted the moveElements() function to SF-featurerequests friday, > but since this is an existing function that I'm requesting be changed, I > thought it should be posted here for developers' review. > > One of my template sets uses subdirectories. The listTemplates function > couldn't be used with it without the following parameter addition. The > new code is in red. > > * @param string $subdir The name of a requested subdirectory within > the template directory > > function listTemplates($module, $subdir = NULL, $dirOnly = FALSE) { > if ($subdir!=NULL) > $subdir = $subdir . "/"; > if(is_dir($GLOBALS["core"]->home_dir . "themes/" . > $_SESSION["OBJ_layout"]->current_theme . "/templates/" . $module . > "/" . $subdir)) { > return $GLOBALS["core"]->readDirectory($this->home_dir . "themes/" > . $_SESSION["OBJ_layout"]->current_theme . "/templates/" . $module > . "/" . $subdir, $dirOnly); > } else if(is_dir($GLOBALS["core"]->home_dir . "mod/" . $module . > "/templates/" . $subdir)) { > return $GLOBALS["core"]->readDirectory($this->home_dir . "mod/" . > $module . "/templates/" . $subdir, $dirOnly); > } else { > return FALSE; > } > } // END FUNC listTemplates() > > -Eloi George- |