[Koha-devel] templating

Roger Buck rog at saas.nsw.edu.au
Mon May 13 01:26:02 CEST 2002


Hi Steve,

Tonnesen Steve wrote:
> 
> After a bit of playing with HTML::Template I have the
> following proposal

[--snip--]

> Templates stored in includes directory under templates
> subfolder, each module (ie search, circ, catalog, etc.)
> has another subfolder, then another subfolder for each
> template, and then subfolders for each version of that
> template.
>
> Includes 
>   Templates
>      Search
>         Opac Search
>            default.tmpl
>            polish.tmpl
>            french.tmpl
>            local.tmpl
>         Librarian Search

[--snip--]

> I don't know if this is too complicated, or too simple.
> What do we do if we have three different "default" opac
> results templates?  What about a per-user preference
> for different templates?  Maybe language should be
> dealt with completely separately...
> 
> Just airing some thoughts...

These are not direct answers to your question but I hope they are useful
nonetheless:

The first distinction i'd draw is between the html "active content"
versus the content "look and feel"

For example, in the current koha, the "active content" control is
partially implemented using the "type=" parameter in the *.pl files:
Where the "active content" is displayed differently depending on the
"type" of user accessing the file (the "active content" and "look and
feel" depend on whether the "type" param equals "intra" or "opac" for
example)

It looks to me like the "type" options in combination with the new
hierarchy might be getting overly complex? 

Raison d'etre for the "type" option is based on access level
considerations as much as "look and feel"? If that is so, then the
primary need may be for the admin to be able to specify an "html
template set" based on user access level, and only secondarily on "look
and feel"?

For example - there may be three distinctly different versions of

 /catalogue/index.html 

depending on whether the user is a "NonMember", "Member", "Librarian",
etc...

For ease of controlling user access via a webserver (various flavours of
auth), then the directory hierarchy might look more like:

Includes 
   Templates
      NonMember
	  Search
             default.tmpl
             polish.tmpl
             french.tmpl
             local.tmpl

      Member
	  Search
             default.tmpl
             polish.tmpl
             french.tmpl
             local.tmpl
	
      Librarian
	  Search
             default.tmpl
             polish.tmpl
             french.tmpl
             local.tmpl


This would allow webserver authentication control at the parent folder
level and possibly for the admin to specify root path based on a user
access level?

I dunno if this is useful input in relation to your central question
about HTML::Template -  but I hope it makes sense at least :)

R.




More information about the Koha-devel mailing list