[Zope] anchor tags in python
Daniel Tang
daniel.tang@chronicle.com
Thu, 8 May 2003 14:54:17 -0400 (EDT)
On Thu, 8 May 2003, Paul Winkler wrote:
> On Thu, May 08, 2003 at 02:30:31PM -0400, Daniel Tang wrote:
> >
> > Hello,
> >
> > I was wondering how to pass a page anchor in a python script...
> >
> >
> > My script:
> > ----------
> > import string
> > import types
> >
> > form=context.REQUEST.form
> >
> > # do some processing, etc...
> >
> > # return the birds page at the anchor (how???)
> >
> > joint = container['birds']
> > return joint()
>
> why call it? you could redirect instead.
> e.g.
>
Thanks for the help...
If I had some variables, how would i pass those along in a redirect?
joint = container['birds']
return joint(var=var, var2="robin", var3="cardinal")
--Daniel
> response = context.REQUEST.RESPONSE
> anchor_name = 'bird_song' # or this could be dynamically generated
> response.redirect('%s#%s' % (container['birds'].absolute_url(), anchor_name))
>
>
> --
>
> Paul Winkler
> home: http://www.slinkp.com
> "Muppet Labs, where the future is made - today!"
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>