Changeset 26320 for main

Show
Ignore:
Timestamp:
16.10.2012 15:19:43 (7 years ago)
Author:
kjdon
Message:

if we can't find an xsl name, and we are page action, then use teh subaction as the xsl name. That way a user can create a new page for her collection just by adding xsl file xxx.xsl and linking via a=p&sa=xxx

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/TransformingReceptionist.java

    r26169 r26320  
    997997            name = this.xslt_map.get(action); 
    998998        } 
    999  
     999        if (name== null) { 
     1000          // so we can reandomly create any named page 
     1001          if (action.equals("p") && !subaction.equals("")) { 
     1002            // TODO: pages/ won't work for interface other than default!! 
     1003            name="pages/"+subaction+".xsl"; 
     1004          } 
     1005           
     1006        } 
    10001007        Document finalDoc = GSXSLT.mergedXSLTDocumentCascade(name, (String) this.config_params.get(GSConstants.SITE_NAME), collection, (String) this.config_params.get(GSConstants.INTERFACE_NAME), base_interfaces, _debug); 
    10011008        return finalDoc;