Re: [Formsess-devel] smarty-vars/functions in fs-tags
Status: Beta
Brought to you by:
mrkatana
|
From: Katana <ka...@ka...> - 2003-12-10 08:22:46
|
> I modified _glueAttributes in FormsessTag a little bit and now using
> smarty vars, functions or whatever you want should be possible.
I have added your implementation to the method in CVS. However, I fear
that something might be wrong:
glueAttributes just returns a string with arguments ready to be used in
a smarty function call. If another smarty function call (capture) is
inserted in that string, we will probably end up with a parse error
won't we ?
{fs_input_text name="foo" {capture ...
We probably need to
- keep in a property the list of captures
- return from glueAttributes with a string containing the capture
names when needed
- prepend the captured captures (ahaha.. ahem, right) to the tag
string before it is returned.
What do you think about that ?
> I did not use getAttributesNames() and getAttributeValue, accessing
> $this->attributes directly is much easier.
Sorry but I have removed that. I'd rather avoid as much as possible to
access properties directly. Accessors are in my opinion better,
especially here, since I intend to change the way attributes are handled
later on. However it's just the same :)
> ps: I don't understand the purpose of the first check, if (!$value or
> ($value == 'false')), why passing empty parameters unquoted to the
> smarty-functions? ($format = ' %s=%s';)
In fact, "false" to smarty does not work with a few functions, so It was
necessary to use a different format in order to pass something that
smarty really understands as !true.
--
Katana
|