perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Smith" <smi...@gmail.com>
Subject Re: equivalent of [$ hidden $] for links?
Date Fri, 08 Jun 2007 09:06:27 GMT
Thanks Andrew, the suggestions seem great.

Michael


On 6/7/07, Andrew O'Brien <andrewo@oriel.com.au> 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&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 :)
>
>
> Cheers,
>
> Andrew
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message