Appending # at end of URL

Splash Forums PrettyFaces Users Appending # at end of URL

This topic contains 4 replies, has 3 voices, and was last updated by  Lincoln Baxter III 4 years, 6 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #18891

    singhv
    Participant

    I have this url mapping

    <url-mapping id=”guruProfile”>

    <pattern> /profileee/#{id}/#{keywords}</pattern>

    <view-id> /myPage.html</view-id>

    </url-mapping>

    myPage.html needs #aboutme appended at the end to display the data correctly

    How can I append #aboutme at the end in <view-id> /myPage.html</view-id>

    #23170

    Hi,

    actually I don’t know if this is currently possible. Did you try <view-id>/myPage.html#aboutme</view-id>? What error do you get?

    Christian

    #23171

    singhv
    Participant

    If I append #aboutme at end, it tries to find a page with #aboutme

    The message says, requested resource not available

    /skill/tutorProfile.html#aboutme

    #23172

    I don’t think this will work at all. The anchor (the string after #) is interpreted by the browser and used to scroll to the correct position in the document. So it doesn’t make any sense to have an pretty URL without an anchor and forward it to a resource with an anchor.

    #23173

    Yes, if you need to add an anchor to outbound URL links, then it probably makes most sense to add the anchor directly in the link itself. The <pretty:link> component has an “anchor” attribute for this purpose, and I believe other components have similar features (or should have.)

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Comments are closed.