Gossamer Forum
Quote Reply
templates
Hello!
I have one question. How to change the tags signs (<%..%>) into something else (ex. <! ..!>)?
FOrum's help sais:
Quote:
By default a tag is anything enclosed between <% and %>. These can be changed by specifying the $tpl->begin and $tpl->end methods.
I have tried everything. I did't find such methods.
I'll be greatful if anyone can help me.
Quote Reply
Re: [laurie] templates In reply to
You can find that you want in GT::Template

Look for

$ATTRIBS = { func_code => undef, heap => undef, root => '.', strict => 1, compress => 0, begin => '<%', end => '%>', escape => 0, print => 0, stream => 0, cache => 1 };

...near the top.

Last edited by:

PaulW: Nov 28, 2001, 10:04 AM
Quote Reply
Re: [PaulW] templates In reply to
I need to modify it from scripts, dynamiclly, using GT::Template
in help is explicit written that exists a method, that I couldn't find.


Quote Reply
Re: [laurie] templates In reply to
Code:
my $tpl = new GT::Template({
root => '/path/to/templates',
compress => 1,
strict => 0,
begin => '<!',
end => '!>'
});

Last edited by:

PaulW: Nov 28, 2001, 10:33 AM
Quote Reply
Re: [PaulW] templates In reply to
have you tried it?
it doesn't work.
Quote Reply
Re: [laurie] templates In reply to
Read the docs at the bottom of Template.pm

What exactly did you try?

Last edited by:

PaulW: Nov 28, 2001, 11:08 AM
Quote Reply
Re: [laurie] templates In reply to
Hmmmm...

You're right, it doesn't work. It's because the template parser is actually two modules - GT::Template and GT::Template::Parser. GT::Template isn't passing its begin and end tags to GT::Template::Parser as it should.

I'll look into that and fix it up.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [jagerman] templates In reply to
>>You're right, it doesn't work. It's because the template parser is actually two modules - GT::Template and GT::Template::Parser.<<

What about GForum::Template ?
Quote Reply
Re: [PaulW] templates In reply to
Oh nevermind, that isn't called directly.
Quote Reply
Re: [jagerman] templates In reply to
Thx, Jagerman
let me know what u did, pls.