I've often thought I needed the ability to pass multiple variables to
a formatter, but after taking a second look I have always been able to
work around it by wrapping multiple variables in a object.
var three = {one: "first value", two: "second value"};
myDomplate.myTag.append({three:three}, $("someDiv"));
Then I can call my fomatter, i.e. "$three|myFormatter", and then do
somthing like the following:
function myFormatter (val) {
var one = val.one;
var two = val.two;
}
--Nathan
On Wed, Sep 10, 2008 at 9:46 PM, Christoph Dorn
<[EMAIL PROTECTED]> wrote:
>
> Domplate within firebug does not support passing multiple variables to
> a formatter callback function. I have a modified version of domplate
> which does support it.
>
> See here:
> http://www.christophdorn.com/Blog/2008/09/10/domplate-variables-and-variable-formatters/
>
> Christoph
>
>
> On Aug 7, 5:03 pm, Aron L <[EMAIL PROTECTED]> wrote:
>> I have a question aboutdomplatewhich I have not been able to answer
>> myself through looking throughdomplate.js nor by searching google. I
>> know you can pre-process one variable before display, but is it
>> possible to call a filter on two variables.... i.e. "$one, $two|
>> function"?
>> Thanks,
>> Aron
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Firebug" 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/firebug?hl=en
-~----------~----~----~----~------~----~------~--~---