On Fri, Apr 17, 2009 at 8:13 PM, DrunkenMonk <[email protected]> wrote:

> OK, I'm tired of creating a new topic just because I have a new topic
> to discuss, as I feel like I'm spamming the board completly, so here
> goes:
>
> I find myself wanting to generate a list of text fields based on the
> existence of pages in a group
>
> [[#generator]]
> [(template first)][form]
> [(template each)][text {+p4} {?{+p4}}]
> [(template last)][form]
>
> simply enough. BUT.
> {?{+p4}}
> doesnt work, as the '?' markup doesnt accept inner variables.

This doesn't work because ?vars are processed before {+p4}.

> I tried to extend the markup table by adding this to the end of my
> index.php:
>
> MarkUp('vars', 'request', '/\{\?{+([.a-zA-Z0-9]+)}\}/e',
> "htmlspecialchars(\$_REQUEST[BOLTvars('$1', "$zone")], ENT_NOQOUTES,
> 'UTF-8')");

You might be able to get this to work by adding a : to the character
set. This is because BoltWire changes {+p4} to {some.page:p4} before
running any markup rules. This is how the same template can work on a
lot of pages.

Give it a try and see what happens. The other option is to change the
order of the markup rules. Something like this:

MarkUp('vars', 'request', '');
MarkUp('vars', 'request2', '/\{\?([.a-zA-Z0-9]+)\}/e',
"htmlspecialchars(\$_REQUEST['$1'], ENT_NOQUOTES, 'UTF-8')");  //
{?var}

The first gets rid of the initial pattern and the second re-adds the
same rule to the end of the vars markup rules. Actually, you don't
need to turn off the first one. So probably the second line only is
needed.

Hope this helps.

Cheers,
Dan

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to