perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew O'Brien" <>
Subject RE: equivalent of [$ hidden $] for links?
Date Thu, 07 Jun 2007 01:50:49 GMT

Hi Michael,

> [$ hidden $] is very handy for making sure form variables get passed
> from one page to another, but is there anything similar for links?
> That is to say, if the url is
> page.epl?param1=x&param2=y
> and I have a link on a page in which I also want to include param1 and
> param2 ...
> say <a href="/page2.epl?param3=z"/>
> in which I also want to pass param1 and param2, is there simple way to
> do it, such that any parameters not included in this link are
> inherited?

I can't think of a way off the top of my head but I'm not a heavy user
of 2.x (most of my production stuff still runs 1.3x!). There is a
shortcut that might help you keep track of things:

<a href="/page2.epl?[+ \%url_params +]">

Or, depending on what you wanted to override and pass through:

  process fdat, perform form actions and delete items that you know
  are not pure content (eg submit button values etc) from fdat here.
  Or stick them in another hash. Whatever works for your page logic.
<a href="/page2.epl?[+ { %fdat, param3 => 'z'' } +]">

Like I said, there may well be a way overriding some of the Embperl
syntax stuff but the above is perhaps clearer. Well, to me anyway :)



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message