Gossamer Forum
Home : Products : Gossamer Links : Discussions :

2.04 globals

Quote Reply
2.04 globals
Alex,

Are globals parsed for other globals? --

>> 'body_table' => '<table border="0" width="<%body_width%>" cellpadding="0" cellspacing="0">',

If so, how is that done? Seems somewhat recursive.


Also, there is no '<%/body_font%> tag, as there is for the <%header_font%> Even if it's just a plain "</font>", there really should be a matching closing tag for every open tag.



PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: 2.04 globals In reply to
Hi,

No that is a bug in the globals file. =)

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: 2.04 globals In reply to
This brings up an interesting issue, since my globals file is about 70 items long already.

What about going to a system like is used on a Unix boot sequence?
Within the templates directories is a subdirectory called "globals".

Within it, are globals files -- globals01.txt, globals02.txt, etc (the parsing rule for the directory would be simply alphabetic, so they could be called first.file.to.be.loaded, last.file.to.be.loaded).

Each file would set up a page in the Admin, the admin would use the number of files in the directory to set up a page index. A special variable would be used in each file for a directory identifier, such as DIR_INDEX="Scalar Values", so when the admin made a left-side page index, it would just read those files, and yank out that variable, and make a human-meaningful link.

This way, there could be cascading development of variables, even if the variables were inserted into the same hash at the end of the init procedure.

This would allow a first file that could set up color values, width values, and such. A second file that set up formatting tags, that used those values, and a third file with "other" values, and a fourth with "functions" that could use those values.

If you didn't want to use this feature, you could define the functions in one file (like apache) but if you needed to, you could use separate files.

If each file had "format" option, so you could change the display parameters, so that a "scalar" file would list each option as a simple input text field, and not a text area field, that would help cram more information on a screen.

While this would take some twiddling, it shouldn't actually be too hard. The only question is what sort of performance hit, since this would happen quite often...??

PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: 2.04 globals In reply to
Hi,

The globals are loaded on every request, having to load that many files would add too much of a performance hit. Perhaps some load on demand system might be useful, where the template module would load the globals file only if it finds a tag that doesn't exist.

Cheers,

Alex

--
Gossamer Threads Inc.