My apologies for not getting back to this earlier. I wanted to look
into this a bit and still haven't really had time to do that
thoroughly. But at least a few preliminary thoughts. I realize DM
first posted about this several weeks back when I was in Australia.
First, my initial thoughts are that it is working exactly the same way
it was intended. So far, consistently, variables can not contain
spaces whether system, data, or info vars. In fact if you write {one
two} or {:one two} or {::one two} in a page, these will not even get
picked up for processing. I'm not enthusiastic about changing this
behavior, as it could potentially open up several kinds of problems.
So to be consistent I think info vars should not be defined this way.
Obviously a custom function could be written or something, just I'm
not sure about adding this to the core.
The point DM makes about the info function behaving weirdly ("If there
is a space in the fieldname, the function does not find a previous
instance of the field, but manages to append the value anyway. The
result is an appended value without a comma") should be considered a
bug. The info function should be smart enough to recognize an invalid
field name has been entered and handle it gracefully. I'll try to fix
that.
DM's point that changing the default pattern might also adversely
affect performance is also noted. And I suspect he's right, though I
haven't tested. I'm willing to explore or help with other options if
this capability is needed, but think it's best for BoltWire if we
think of info var field names as a variable, not a string. IE, not
spaces or weird punctuation, etc.
Cheers,
Dan
P.S. I'm always open to persuasion...
On Mon, Jul 27, 2009 at 6:51 AM, DrunkenMonk<[email protected]> wrote:
>
> If it does, the info function may become much slower on some pages, as
> it will have to search through paragraphs to find possible info
> variables.
>
> However, this could be solved by running the field through a search
> and replace...
>
> On Jul 27, 7:16 am, Martin <[email protected]> wrote:
>> info should take all characters up to the first ":" as field.
>>
>> It does not. It takes only the first word and scramble the results
>> when two words
>> are found.
>>
>> [(template each)][(info target=info.test field="{+::item}" value=+
>> {+p})]
>>
>> Results:
>>
>> one_word: value1,value2 => fine
>> two words: value1value2 => not good
>>
>> Greetings, Martin
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---