Ok. Here is a more readle diff (I hope). --WebMacroSitePage.java-- 130a131,135 >//If the template does not start with a comma, and there is a referring template >available, >//evaluate the absolute template name and save it as the template name > if ( TurbineResources.getBoolean("use.relative.templates", false)) > setAbsScreenTemplate(data); > 262c268,286 < } --- > /** > * This method finds out if there is any referring template information available. > * If it is available it creates an absolute template name using the referring >template > * and the template information, and saves that absolute name as the template name. >This > * method should be called only once in WebMacroSitePage. > * > * If the template name starts with a comma, the referring template is ignored. > * > * Creation date: (6/15/00 12:46:34 PM) > * @author Moshiul Shovon <a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a> > * @param data org.apache.turbine.util.RunData > */ > public void setAbsScreenTemplate(RunData data) > { > String template = data.getTemplateInfo().getScreenTemplate(); > if (null == template) > return; > String referringTemplate = data.getTemplateInfo().getScreenRefTemplate(); > String name = null; 263a288,318 > //if template start with a slash ignore the referringTemplate > if (template.startsWith("/")) > { > name = template.substring(1); > } > else > { > if ((null == referringTemplate) || (0 == referringTemplate.length())) > { > name = template; > } > else > { > //referring template will be in the form "a/b/c/d.wm", > //we need to ignore anyting after the last slash(/) > int indexOfLastSlash = referringTemplate.lastIndexOf('/'); > if (-1 == indexOfLastSlash) > { > name = template; > } > else > { > String refDirectory = referringTemplate.substring(0, >indexOfLastSlash); > name = refDirectory + "," + template; > } > } > } > name = name.replace('/', ','); > data.getTemplateInfo().setScreenTemplate(name); > } > } -------------- diff -wbBr old/TemplateInfo.java ./TemplateInfo.java 276a277,294 > > > /** > * Get the value of refering template name.<br> > * This information comes from PathInfo or a QueryString. > * Note: The rtemplate name is always "cleaned" with > * this method - replaces , with / > * @return Name of referring template with commas replaced by slashes. > */ > public String getScreenRefTemplate() > { > String temp = data.getParameters().getString("rtemplate", null); > if (temp != null) > { > temp = temp.replace(',', '/'); > } > return temp; > } diff -wbBr old/TurbineResources.properties ./TurbineResources.properties 265a266,273 > > > # This is used by WebMacroSitePage. If it is set to true, template > # names are resolved relative to the referring template. When it > # is true, absolute template names must start with a comma. > # Default: false > use.relative.templates=false > diff -wbBr old/WebMacroLink.java ./WebMacroLink.java 89a90,91 > > String refTemplate = null; //referring template name 95a98,100 > //save the refering template > if (TurbineResources.getBoolean("use.relative.templates", false)) > refTemplate = data.getParameters().getString("template"); 103a109,112 > //add the referring template as 'rtemplate' > if ((null != refTemplate) && ( refTemplate.length() > 0)) > addPathInfo("rtemplate", refTemplate); > __________________________________________________ Do You Yahoo!? Send instant messages with Yahoo! Messenger. http://im.yahoo.com/ ------------------------------------------------------------ To subscribe: [EMAIL PROTECTED] To unsubscribe: [EMAIL PROTECTED] Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/> Problems?: [EMAIL PROTECTED]