[TYPO3-mvc] RFC: New comments in FLUID

Stephan Schuler Stephan.Schuler at netlogix.de
Thu Mar 1 11:37:06 CET 2012


Hey all.


I just read all of your comments and thought a lot of "no, please don't" :).

Speaking in terms of compiler building, it should be easy to integrate any kind of comment with clear and detectable "on" and "off" brackets, no matter if it's "<!--- foo --->", "_IGNORE foo IGNORE_" or anything else.
Speaking of the interns of the Fluid parser: I don't know how it does its job and if it sticks to common techniques of compiler building. So integrating such a thing *could* make the parser more complex which *could* lead to even worse rendering times.

But without any negative drawbacks in mind: I think there is no need for such a thing that breaks the current Fluid rules. I go with Christian Müller: If there is something to be commented inline that should not go to the rendered code, you can still use the onboard mechanisms.

Personally, I sometimes use a <f:if condition="FALSE"></f:if>. That's not nice but it does the trick without patching the Fluid parser.
Sometimes I go with render/section. Then there is room for comments in the "white space" where the "render" node is open but no "section" node is (http://pastebin.com/QRgDSUXb).

Both are ways to have FLUID-only inline comments with no additional core code in Fluid. I would highly appreciate to stick to that.


If we really want a dedicated comment syntax, we should go for "<f:comment></f:comment>" as a tiny non-rendering comment view helper. That could be extended a bit to render or skip the comment string depending on some condition, e.g. logged in be_user with activated admin panel.


Kind regards,


Stephan Schuler
Web-Entwickler

Telefon: +49 (911) 539909 - 0
E-Mail: Stephan.Schuler at netlogix.de
Website: media.netlogix.de


--
netlogix GmbH & Co. KG
IT-Services | IT-Training | Media
Andernacher Straße 53 | 90411 Nürnberg
Telefon: +49 (911) 539909 - 0 | Fax: +49 (911) 539909 - 99
E-Mail: info at netlogix.de | Internet: http://www.netlogix.de

netlogix GmbH & Co. KG ist eingetragen am Amtsgericht Nürnberg (HRA 13338)
Persönlich haftende Gesellschafterin: netlogix Verwaltungs GmbH (HRB 20634)
Umsatzsteuer-Identifikationsnummer: DE 233472254
Geschäftsführer: Stefan Buchta, Matthias Schmidt



-----Ursprüngliche Nachricht-----
Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org [mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von Jigal van Hemert
Gesendet: Donnerstag, 1. März 2012 09:40
An: typo3-project-typo3v4mvc at lists.typo3.org
Betreff: Re: [TYPO3-mvc] RFC: New comments in FLUID

Hi Christian,

On 1-3-2012 9:18, "Christian Müller (FLOW3 Team)" wrote:
> thanks for checking that, I wasn't totally sure but didn't look it up.

I came across the syntax of comments years ago with a piece of HTML like:
<!-- [somehtml]
<!-- [some more html]
-->
and Firefox showed the [some more html] part. The mozilla bug tracker had a discussion where the developers said that the comment ended with the second '--' and everything after that until the closing '>' wasn't part of the comment.
I think the behaviour was changed in recent versions.

> <!--## ##-->
>
> Only problem then could be if someone (for whatever reason) needs to
> mix classic TYPO3 templating with Fluid, because then you must watch
> to

In classic templating the ###|### is just the default wrap for markers.
You can use anything in the API functions. I don't think we can take that into account here.

--
Kind regards / met vriendelijke groet,

Jigal van Hemert.
_______________________________________________
TYPO3-project-typo3v4mvc mailing list
TYPO3-project-typo3v4mvc at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc


More information about the TYPO3-project-typo3v4mvc mailing list