On Mon, Dec 15, 2008 at 8:33 PM, jacmgr <[email protected]> wrote:
>
> I have a function in my config file. In a page I can call that
> function and it returns html to be inserted in the page
>
> [(myfuncname)]
>
> What I would like is that the function sets some variables that can be
> used in the markup following the function. Is something like that
> possible?
>
> The example below is made-up fiction, just to show idea.
>
> In config.php
> ===============
> function BOLTFmyfuncname($args, $zone) {
>
> $name = 'BOB';
> $animal='dog';
>
> $myarray['one'] = 'tree';
> $myarray['hat'] = 'flower;
>
> return
> }
>
> In the page
> ===================
> [(myfuncname)]
> Hello {name}, I like your {animal}.
> Please keep the {animal} away from my {myarray['one']} and {myarray
> ['hat']}
> ======================
>
> Basically the real function would be retrieving some external site
> data and processing it and then I would want to display some of the
> data in the page. Allowing the user to modify the way the page looks.
>
> Any suggestion would be appreciated
I'm sure I'm missing something, but why you just can't do this:
function BOLTFmyfuncname($args, $zone) {
$name = 'BOB';
$animal='dog';
$myarray['one'] = 'tree';
$myarray['hat'] = 'flower;
return "Hello $name, I like your $animal.<br>Please keep the
$animal away from my $myarray[one] and $myarray[hat].";
}
Perhaps you could clarify your question. I'm assuming you have some
method for getting the data info you need based on args in the
function, and that's not your question... Is it that are you wanting
to make the template flexible, so you could adjust it within the wiki?
If so, I have some easy suggestions for that....
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
-~----------~----~----~----~------~----~------~--~---