You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gary Larsen <ga...@envisn.com> on 2005/10/27 01:41:44 UTC
Navigate to anchor in generated page?
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 directly 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?
Thanks for any assistance.
Gary
RE: Navigate to anchor in generated page?
Posted by Gary Larsen <ga...@envisn.com>.
I finally got it!
Thanks for the patience,
Gary
> -----Original Message-----
> From: Upayavira [mailto:uv@odoko.co.uk]
> Sent: Thursday, October 27, 2005 9:08 AM
> To: users@cocoon.apache.org
> Subject: Re: Navigate to anchor in generated page?
>
> 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?
>
> Upayavira
>
>
> >>-----Original Message-----
> >>From: Andrew Stevens [mailto:ats37@hotmail.com]
> >>Sent: Wednesday, October 26, 2005 8:19 PM
> >>To: users@cocoon.apache.org
> >>Subject: RE: Navigate to anchor in generated page?
> >>
> >>
> >>>From: "Gary Larsen" <ga...@envisn.com>
> >>>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
> >>
> >>directly
> >>>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...
> >>
> >>
> >>Andrew.
> >>
> >>
> >>
> >>------------------------------------------------------------
> ---------
> >>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> >>For additional commands, e-mail: users-help@cocoon.apache.org
> >>
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Navigate to anchor in generated page?
Posted by Upayavira <uv...@odoko.co.uk>.
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?
Upayavira
>>-----Original Message-----
>>From: Andrew Stevens [mailto:ats37@hotmail.com]
>>Sent: Wednesday, October 26, 2005 8:19 PM
>>To: users@cocoon.apache.org
>>Subject: RE: Navigate to anchor in generated page?
>>
>>
>>>From: "Gary Larsen" <ga...@envisn.com>
>>>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
>>
>>directly
>>>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...
>>
>>
>>Andrew.
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>For additional commands, e-mail: users-help@cocoon.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: Navigate to anchor in generated page?
Posted by Gary Larsen <ga...@envisn.com>.
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.
Gary
> -----Original Message-----
> From: Andrew Stevens [mailto:ats37@hotmail.com]
> Sent: Wednesday, October 26, 2005 8:19 PM
> To: users@cocoon.apache.org
> Subject: RE: Navigate to anchor in generated page?
>
> >From: "Gary Larsen" <ga...@envisn.com>
> >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
> directly
> >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...
>
>
> Andrew.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: Navigate to anchor in generated page?
Posted by Andrew Stevens <at...@hotmail.com>.
>From: "Gary Larsen" <ga...@envisn.com>
>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 directly 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...
Andrew.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org