Re: [htmltmpl] Question about syntax
Brought to you by:
samtregar
From: Michael P. <mi...@pe...> - 2004-08-11 14:03:27
|
Brad Cathey wrote: > I've been using H::T for about a year have noticed variations in syntax. For > example: > > <tmpl_var name="somename"> This fit's better as HTML/XHTML since it has a tag name and the attribute it quoted. Probably the best if you are planning on using other advance attributes of the tag (like ESCAPE, etc). > <tmpl_var name=somename> (no quotes) This is easier since you don't have to type the quotes. But if the rest of your template is XHTML this would standout > <!-- <tmpl_var name=somename> --> This works well if you are using an (X)HTML editor that specifically recognized HTML and nothing else. This will just tell it to skip over you TMPL_VAR tags. Would also be better if you put your templates through some kind of validation before using them. > <tmpl_var somename> (drop 'name=') I like it too cause it's simple and easy, but it definitely would stand out in an (X)HTML editor and may even cause problems (depending on you editor). There isn't really a difference in which one you use (unless you are using other attributes besides name). Mainly just choices of style and just making you editor happy. -- Michael Peters Developer Plus Three, LP |