<TMPL_VAR> in HTML tag attributes.

2000-02-03
2001-07-12
  • Drew Farris

    Drew Farris - 2000-02-03

    It makes me feel really dirty to do something like:

    &lt;INPUT TYPE=TEXT NAME="THING" VALUE="&lt;TMPL_VAR NAME=STUFF%gt;"&gt;

    Is there any way that you can provide an alternative to avoid the characters
    &lt; and &gt; within tag attributes?? how about:

    &lt;INPUT TYPE=TEXT NAME="THING" VALUE="??TMPL_VAR NAME=STUFF??"&gt;

    or something.

     
    • Drew Farris

      Drew Farris - 2000-02-03

      hrm, that didn't look quite right, lets try again...

      Instead of:
      <INPUT TYPE="TEXT" NAME="THING" VALUE="<TMPL_VAR NAME=STUFF>">

      how something like:

      <INPUT TYPE="TEXT" NAME="THING" VALUE="??TMPL_VAR NAME=STUFF??">

       
      • Andrey Melnikov

        Andrey Melnikov - 2001-03-02

        Why we need to support two kinds of TMPL_VAR if we can make the same things with only one? I think that we should keep the syntax simple

         
        • Conny Brunnkvist

          I don't think it's about having two kinds - maybe the delimiters should instead be user-definable parameters to the ->new() function?

          Both have theis pro's and cons:

          "<>" AND "<!-- -->" ONLY!:
          [+] Forces people to code in a unified style, easy to read. Consistensy is often good.
          [-] You are often forced to break HTML-rules when creating templates, thus sort of spoiling the idea of templates that are easy to create in visual editors, and easy maintain...

          ALL USER DEFINEABLE:
          [+] You can have your templates as VALID HTML!
          [-] People might start using ~" and screw the idea this way, or at least get a bad impression of template-driven development.

           

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks