Gossamer Forum
Quote Reply
Re: [Alex] Template Sets In reply to

Is this a logic/stylistic thing where:

Links::user_page ('template', { vars }, { opts });

is the way to call most templates?

Links::SiteHTML::display ( 'template', { vars }, { options });

does a check for certain templates, which does additional processing -- such as link.html where the various flags are set.

Links::user_page would probably have a lower overhead, since it's the end result of the call to Links::SiteHTML::display anyway. This does create some interesting nesting issues.

For instance, I'm assuming that the template parser, when it hits an <%include%> calls Site::HTML::display, to pick up the included links.html files, etc.

The only problem I see here, is if this calling convention changes, this display routine has been hard coded into the scripts, from the main Links library. I can see further development taking it to:


It seems that this is an area of the program that is still developing.

An off the wall idea/comment:

Since Links::SiteHTML is where the specialized display routines go, what about extending this so that users/authors/plugins can insert specialized display routines to this tree? If a subdirectory was created "UserDisplay", into which an author could place code fragments which consist of a named subroutine to be required into the code prior to a call to the autoload function. It would override the autoloaded function, and it would allow an extensible, survivable method of providing specialized output routines at the expense of a directory call.

PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Subject Author Views Date
Thread Template Sets pugdog 2188 Dec 19, 2001, 10:05 PM
Thread Re: [pugdog] Template Sets
Alex 2086 Dec 27, 2001, 9:41 AM
Post Re: [Alex] Template Sets
pugdog 2081 Dec 27, 2001, 6:18 PM