Yep. I stumbled over this as well. It is not clear what variables are
available to you in the template. We should have a list of default
variables documented somewhere in the templates manual.
Arjan
> And there, it hints at the info is in the query args: " �foo� and
> other arguments will become query args ". No proper example use is
> given, though, especially for use within a template :/
>
> However, you can access the query args from a template with the `q`
> variable.
>
> So this ought to work (not tested), my.tpl:
>
> Value of foo is: {{ q.foo }}.
>
>
> Now, I spent a few minutes searching the docs for any reference at all
> to this "magic" q variable in the templates, but came out short.
> Well, now that I did find some reference to this use, I also found it
> mentioned in the docs, but that was so in passing so it's impossible
> to find when searching for it.
>
http://zotonic.com/docs/0.9/ref/scomps/scomp_pager.html
>
> Try it, see if it works! :)
>
> 2013/3/26 Andreas Stenius <
andreas...@astekk.se
> <mailto:
andreas...@astekk.se>>:
> > Ah, sorry. At first I thought someone else would chime in on this. I
> > think it is a interesting question, that I'd like answered too...
> >
> > I'll poke around a bit see what I can find out.. :)
> >
> > 2013/3/26 Behrad Zari <
beh...@gmail.com <mailto:
beh...@gmail.com>>:
> >> Anybody?
> >>
> >>
> >> On Sunday, March 17, 2013 4:36:50 PM UTC+3:30, Behrad Zari wrote:
> >>>
> >>> Considering I have
> >>>
> >>> {% wire name="user_did_that" action={update target="id"
> template="my.tpl"}
> >>> %}
> >>>
> >>> z_event("user_did_that", { foo: bar });
> >>>
> >>>
> >>> then, how can I access {{ foo }} in my.tpl? (if it will be
> possible, since
> >>> we had talked about a topic on actions being early bound in
> previous topics)
> >>>
> >> --
> >>
> >> ---
> >> You received this message because you are subscribed to the
> Google Groups
> >> "Zotonic users" group.
> >> To unsubscribe from this group and stop receiving emails from
> it, send an
> >> email to
zotonic-user...@googlegroups.com
> <mailto:
zotonic-users%2Bunsu...@googlegroups.com>.
> <mailto:
zotonic-users%2Bunsu...@googlegroups.com>.