
smithm at gmail
Jun 8, 2007, 2:06 AM
Post #3 of 3
(1230 views)
Permalink
|
|
Re: equivalent of [$ hidden $] for links?
[In reply to]
|
|
Thanks Andrew, the suggestions seem great. Michael On 6/7/07, Andrew O'Brien <andrewo [at] oriel> wrote: > > 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¶m2=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 :) > > > Cheers, > > Andrew > > --------------------------------------------------------------------- > To unsubscribe, e-mail: embperl-unsubscribe [at] perl > For additional commands, e-mail: embperl-help [at] perl > > --------------------------------------------------------------------- To unsubscribe, e-mail: embperl-unsubscribe [at] perl For additional commands, e-mail: embperl-help [at] perl
|