On Apr 19, 2010, at 5:38 AM, G. Clifford Williams wrote: > I'm trying to figure out how to get links created in web2py that point to an > anchor name here is the code I'm using: > > {{=DIV(SPAN(gripe.created_on, _class='gripe-date'), > A(SPAN(SPAN('Comments:'), > SPAN(gripe.comments, _class='comment-number'), > _class='comment-count'), > _href=URL(r=request, f='gripe', > args=[gripe.id, > XML('#comments')] )), > _class='gripe-footer')}} > > > from this I was hoping to get a link like: > http://localhost:8081/init/default/gripe/9/#comments > > but instead I got : > http://localhost:8081/init/default/gripe/9/%23comments
Try _href=URL(r=request, f='gripe', args=[gripe.id], anchor='comments' )), Which should get you something like this (note no slash before the anchor): http://localhost:8081/init/default/gripe/9#comments -- Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en