On Wed, Aug 11, 2004 at 08:26:39AM -0500, Brad Cathey wrote:
> I've been using H::T for about a year have noticed variations in syntax. For
> example:
> 
> <tmpl_var name="somename">
> 
> vs.
> 
> <tmpl_var name=somename> (no quotes)
> 
> vs.
> 
> <!-- <tmpl_var name=somename> -->
> 
> and finally:
> 
> <tmpl_var somename> (drop 'name=')
> 
> I like the last one‹short and simple. Pros and cons, especially in my last
> example.

Initially I was a strict comments-only syntax user. Over the years I've
changed my view a little.

I now use comments-only syntax everywhere *except* inside tag
attributes, e.g.:

  <img src="<TMPL_VAR myimage>">

as opposed to

  <img src="<!-- TMPL_VAR NAME="myimage" -->">

which screws up syntax higlighting to the Nth degree.

I could probably use:

  <img src="<!-- TMPL_VAR myimage -->">
  or
  <img src="<!-- TMPL_VAR NAME=myimage -->">

But I figure that when I'm inside an attribute I need to remove as much
'fluff' as possible to keep it legible.

Using the comment syntax elsewhere means that it shows up clearly in
vim, rather than just blending in (and should pass any HTML validation
too)

Just my tuppence,

Chisel
-- 
e:   [EMAIL PROTECTED]      |    If you play a Windows XP installation
w:   http://www.herlpacker.co.uk/ |     CDROM backwards, you hear a message
gpg: D167E7FE                     |    from Satan. Even worse... if you play
                                  |     it forwards, it installs Windows XP.


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to