cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira>
Subject Re: Navigate to anchor in generated page?
Date Thu, 27 Oct 2005 13:08:16 GMT
Gary Larsen wrote:
> Thanks Andrew.  I'm not describing the problem well.
> - The url with #bookmark gets picked up in the sitemap and runs some
> flowscript.
> - The flowscript prepares data, usually creating a document in eXist if it
> needs to. When done, the flowscript does a SendPage to an internal pipeline
> matcher
> - The matcher then does an aggregation (including the eXist data), a couple
> of transforms to create the html and then runs the html serializer.
> Do I just need to add the #bookmark to the SendPage uri, or maybe append it
> in the uri pipeline somewhere?  
> I'll try some things out this AM.

I think you're still missing the point. Cocoon never needs to know about
anchors in that sense.

 * Page A contains a link to http://foo/bar.html#myanchor.
 * The user clicks that link
 * The browser requests http://foo/bar.html#myanchor
 * Cocoon renders http://foo/bar.html
 * When the page comes back, the browser looks in that file for
   <a name="myanchor"/> and uses that to locate within the page.

So, to implement an anchor you need to (a) have the user click on a link
with an anchor (or redirect to one) and (b) render a page that contains
an <a name="myanchor"/> type link.

Make sense?


>>-----Original Message-----
>>From: Andrew Stevens [] 
>>Sent: Wednesday, October 26, 2005 8:19 PM
>>Subject: RE: Navigate to anchor in generated page?
>>>From: "Gary Larsen" <>
>>>Date: Wed, 26 Oct 2005 19:41:44 -0400
>>>I'm still new with Cocoon and not sure if this is possible.
>>>I would like to navigate to a location in the generated page 
>>>from a link in another page.  (In HTML this would be
>>>http://server/myfile.html#bookmark)  Is this possible when 
>>generating a 
>>>page from the sitemap?
>>Unless I'm missing something, you've already answered your 
>>own question - "In HTML this would be 
>>http://server/myfile.html#bookmark".  So all you have to do 
>>is make the pipeline for your first page include the fragment 
>>identifier #bookmark when it generates the link, while the 
>>pipeline for your second page should include the 
>>corresponding named anchor (<A>) element.  It doesn't matter 
>>whether it's generated by Cocoon, JSPs, Struts or a bunch of 
>>static text files, it's still HTML...
>>To unsubscribe, e-mail:
>>For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message