Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Re: [phoule] Question about template parsing

Quote Reply
Re: [phoule] Question about template parsing In reply to
Hi phoule,

I did successfully upgrade the template. I don't know what you're version looks like and mine is chalk full of mods, but this is what I did and it was quite simple.

In DB_Utils.pm commented out the following lines:

# $TEMPLATE->clear_vars;
# $TEMPLATE->load_template ($tpl, $string) or die ("Can't load template. Reason: $Links::Template::error");
# $TEMPLATE->load_vars ($vars) or die ("Can't load variables. Reason: $Links::Template::error");
# my $output = $TEMPLATE->parse ($tpl) or die ("Can't parse template. Reason: $Links::Template::error");

and added this line instead:

my $output = GT::Template->parse ( $tpl, $vars, $opts ) or die ("Can't parse template. Reason: $Links::Template::error");

Then copied the whole GT directory from the new version(I doubt it's all needed - Just needed to get it working)

That was it. It doesn't provide access to the globals.txt feature as in Links SQL 2.x, but it does provide access to the the if, else, elsif <%set x=something%> add to existing values and so one. Quite nifty and worth the time to do it.
Subject Author Views Date
Thread Question about template parsing phoule 7048 Nov 11, 2001, 9:02 AM
Thread Re: [phoule] Question about template parsing
Stealth 6923 Nov 11, 2001, 9:13 AM
Thread Re: [Chewbaca] Question about template parsing
phoule 6942 Nov 11, 2001, 9:18 AM
Thread Re: [phoule] Question about template parsing
Paul 6920 Nov 11, 2001, 9:21 AM
Thread Re: [RedRum] Question about template parsing
phoule 6930 Nov 11, 2001, 9:26 AM
Thread Re: [phoule] Question about template parsing
Paul 6925 Nov 11, 2001, 9:26 AM
Thread Re: [RedRum] Question about template parsing
phoule 6931 Nov 11, 2001, 9:33 AM
Post Re: [phoule] Question about template parsing
klangan 6871 Nov 21, 2001, 7:38 AM
Thread Re: [RedRum] Question about template parsing
phoule 6927 Nov 11, 2001, 9:43 AM
Post Re: [phoule] Question about template parsing
phoule 6941 Nov 11, 2001, 1:13 PM
Post Re: [phoule] Question about template parsing
Stealth 6914 Nov 11, 2001, 9:32 AM