On Wed, Nov 4, 2009 at 5:03 AM, Dermot <paik...@googlemail.com> wrote:
> Hi, > > I am having trouble with, what I'm sure, is a simple problem. > > I am executing process in this fashion > > $tt->process('subdir/page', > { > user => { > id=> $userid, # some var defined earlier (EG 1234). > }, > subs => { > makeUserLink => \&somFunc > }, > }); > > > In page.tt, at the very top, I have > > [% userid = user.id %] > Interpolated=[% $userid %] # This is empty. > Should be: Interpolated = [% userid %] [% INCLUDE pageNav.inc %] > > There are a number of INCLUDES, an in one (pageNav) I have a line like: > > LID=[% userid %] # This appears correct (EG 1234) > interpolated=[% $userid %] # This is empty. > interpolated=[% ${user.id} %] # This is empty. > > <a href="[% subs.makeUserLink(userid=>$userid )"> > > Should be: <a href="[% subs.makeUserLink(userid => userid) %]"> or: <a href="[% subs.makeUserLink(userid = userid) %]"> In either case your subroutine will get a single hash reference as an argument, with the single key "userid". --Sean
_______________________________________________ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org/mailman/listinfo/templates