Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

GT Template Module

Quote Reply
GT Template Module
Hi Alex

I was just wondering.... Why have you programmed the GT Template module to parse tags like <%tag%> so?

Isn't that a bit confusing with HTML tags? I was just wondering, as I'm seeing a lot of:

<A HREF="<%url%>"><%urlname%></a>

Surely this is very confusing? Just trying to understand the logic behind it. Doesn't thi method cause you a lot of headache, as I know it would do for me! Why not leave out the <> altogether?

Cheers

Wil

- wil
Quote Reply
Re: [Wil] GT Template Module In reply to
Hi,

The <% and %> have been around since the Links v2.0, so it's mainly historical. Languages like PHP and ASP use similiar tags so it should be familiar to people working in those languages.

In theory you can edit GT/Template.pm and change the tags (they are marked as begin => '<%' and end => '%>') but I wouldn't recommend it. =)

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] GT Template Module In reply to
Great minds :)

....well maybe not in my case :)

http://www.gossamer-threads.com/...orum_view_collapsed;
Quote Reply
Re: [Alex] GT Template Module In reply to
Hi Alex

Thanks for the reply. I don't want to start changing things - if it's not broken...

I was just wondering, because I know if I was writing code like:

<A HREF="<%url%>"><%descr%></A>

all day, my head would be spinning! :-\

Cheers

Wil

- wil
Quote Reply
Re: [Wil] GT Template Module In reply to
Hehe, this is why I use vim with a customized syntax file that highlights all the <%tags%> for me Wink

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [jagerman] GT Template Module In reply to
Yep, I thought that you must of been using something like that! Otherwise it would of been a real headache!

Just wondering what the logic behind the initial decision, was.

Cheers

Wil

- wil
Quote Reply
Re: [jagerman] GT Template Module In reply to
hmm... any posibility you can make us a ocpy? I've got a couple different ones for HTML and Perl for TextPad and have no idea how you go about creating them.

--Philip
Links 2.0 moderator
Quote Reply
Re: [Wil] GT Template Module In reply to
Quote:
Yep, I thought that you must of been using something like that! Otherwise it would of been a real headache!

Just wondering what the logic behind the initial decision, was.

To make it easy for people actually. If you've worked with PHP or ASP, then this is very similiar. In PHP, it's common to see:

<a href="<?=$url?>">URL

or something similiar.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [jagerman] GT Template Module In reply to
What's "vim" ???

openoffice + gimp + sketch ... Smile
Quote Reply
Re: [QooQ] GT Template Module In reply to
http://www.vim.org
http://vim.sourceforge.net

Quote:
What is Vim?

Vim is a highly configurable text editor built to enable efficient text editing. It is an improved version of the vi editor distributed with most UNIX systems. Vim is distributed free as charityware.

Although, it can take a while to get used to, it's a really powerful editor. It also works in many platforms, windows, linux, many diff *nix, mac, etc...


Adrian

Last edited by:

brewt: Oct 21, 2001, 7:21 PM
Quote Reply
Re: [brewt] GT Template Module In reply to
Yeah it really scared me after using pico for a long time but once you get used to it, it is pretty cool.
Quote Reply
Re: [QooQ] GT Template Module In reply to
It does have a high learning curve, but is worthwhile knowing a little if you work on unix systems, as it's almost always guaranteed to be there.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [PerlFreak] GT Template Module In reply to
Are you using vim (or gvim)? It's not going to be much use to send it to you if you aren't as it's pretty specific.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [brewt] GT Template Module In reply to
Cool

Not bad !!! But now I gotta learn another piece of software. (I've been using BareBones BBEdit to do most of my work for the past year and what not now.)

That is after I figure out how to use my iMode N503i Tongue

thanks for the infor guys!

openoffice + gimp + sketch ... Smile