Template Parser Patch - Allowing Quoted Arguments, etc.

24 views
Skip to first unread message

Ben Gribaudo

unread,
Mar 2, 2009, 5:56:08 PM3/2/09
to SilverStripe Development
Hello,

Recently, I've run into several issues with the template parser:
- The inability to use commas in string argument as quoted arguments
are unsupported (
http://silverstripe.org/template-questions/show/254953#post254953#post254953).
- The fact that only certain combinations of property/subpropety/
number calls are allowed (http://silverstripe.org/template-questions/
show/254808).
- The limited number of arguments allowed (http://
open.silverstripe.com/ticket/3583).

Sam indicated that a patch implementing quoted arguments might be
accepted (http://silverstripe.org/template-questions/show/254953?
start=0#post254974). I've begun working on a patch that adds this
support and addresses the other issues listed above.

Right now, this patch is still in the early draft stage. It may be
previewed at: http://www.characterfirst.com/public/temp/TemplateParsing-Preview1.patch.txt

My reason for this post is to ask if such a patch is of interested to
the core team, and, if it is, to see if the approach I'm presently
taking is an acceptable approach to solving these issues.

Thank you,
Ben

Ben Gribaudo

unread,
Mar 16, 2009, 10:25:29 AM3/16/09
to SilverStripe Development
Based on Sam's comment and the fact that no objections have been
raised, I'll take that as your approval. Time to finish out this
patch.

Ben

On Mar 2, 5:56 pm, Ben Gribaudo <bgriba...@gmail.com> wrote:
> Hello,
>
> Recently, I've run into several issues with the template parser:
> - The inability to use commas in string argument as quoted arguments
> are unsupported (http://silverstripe.org/template-questions/show/254953#post254953#pos...).
> - The fact that only certain combinations of property/subpropety/
> number calls are allowed (http://silverstripe.org/template-questions/
> show/254808).
> - The limited number of arguments allowed (http://
> open.silverstripe.com/ticket/3583).
>
> Sam indicated that a patch implementing quoted arguments might be
> accepted (http://silverstripe.org/template-questions/show/254953?
> start=0#post254974). I've begun working on a patch that adds this
> support and addresses the other issues listed above.
>
> Right now, this patch is still in the early draft stage. It may be
> previewed at:http://www.characterfirst.com/public/temp/TemplateParsing-Preview1.pa...

Ben Gribaudo

unread,
Mar 18, 2009, 3:17:21 PM3/18/09
to SilverStripe Development
The current version of this patch has been attached to:
http://open.silverstripe.com/ticket/3738

Feedback is most welcome!

Ben
Reply all
Reply to author
Forward
0 new messages