1
LeeStewart
Are Smarty comments {* *} available?
  • 2004/9/1 22:18

  • LeeStewart

  • Just popping in

  • Posts: 10

  • Since: 2004/8/29


I was wondering if it was possible to remove the HTML comments that I'm using with Smarty template comments:



{* Smarty Comments *}


I tried it on theme.html, but it desn't seem to work. Is that functionality disabled?


tia,
Lee

2
Dave_L
Re: Are Smarty comments {* *} available?
  • 2004/9/1 22:42

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Xoops redefines the Smarty delimiters as <{ and }>:

<{* Smarty comment *}>


I prefer Smarty comments to HTML comments, since that way the comments get stripped off earlier.

3
LeeStewart
Re: Are Smarty comments {* *} available?
  • 2004/9/1 22:50

  • LeeStewart

  • Just popping in

  • Posts: 10

  • Since: 2004/8/29


Quote:
Xoops redefines the Smarty delimiters as <{ and
Doh! I just read through some sample theme files and saw that.

I searched this site, but didn't spend enough time digging through the code...

<{* I'm a knucklehead... *}>


Quote:
I think it's better to use Smarty comments than HTML comments, since that way the comments get stripped off earlier.
Actually, an even better option is making it configurable - like another level for debugging.

When making your own templates it might be useful to see those comments, but in a production environment they're just wasting bandwidth.


Thanks for the resonse,
Lee

4
Dave_L
Re: Are Smarty comments {* *} available?
  • 2004/9/1 23:10

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


The nice thing about Smarty comments is that they don't waste bandwidth, since they're stripped off when the template is compiled. I suppose you could say they consume a tiny bit of processor time during the template compilation. But the same applies to comments in .php scripts.

5
LeeStewart
Re: Are Smarty comments {* *} available?
  • 2004/9/6 17:08

  • LeeStewart

  • Just popping in

  • Posts: 10

  • Since: 2004/8/29


Quote:
The nice thing about Smarty comments is that they don't waste bandwidth
Yeah, I totally agree. I was saying that there are times when you're creating a module that you might want to see these comments. In other words, it would be cool if Smarty would convert them to HTML comments when running in debug mode.

Hardly worth mentioning, since it's easy to work around. Mostly I'm tying to post enough so I can upload my own avatar. :)

Login

Who's Online

311 user(s) are online (209 user(s) are browsing Support Forums)


Members: 0


Guests: 311


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits