+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / How to link to a section of a page other than the top

How to link to a section of a page other than the top

6 posts, 0 answered
  1. Marc Myers
    Marc Myers avatar
    8 posts
    Registered:
    21 Apr 2010
    29 Jun 2011
    Link to this post
    Sorry if this is a noob question but I can't figure out how to link to a page other than at the top. I've several long pages with separate content areas. I would prefer to link to those points rather than the top of the page. Using the dynamic links the html

    anchor text: <a name=”label”></a>A Heading Part Way Down the Page
    <a href=”http://www.yoursite.com#label”>keyword anchor text here</a>

    doesn't work. I tried breaking the content on the anchor page into separate blocks of generic content and trying to link to one further down the page without success.

    Thanks in advance for your direction and advice.

    Marc

  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    01 Jul 2011
    Link to this post
    Hello Marc,

    You can use the generic content control and add anchor tags to the page content (in Html mode of the generic contnet control). Then when you include links to the pages you will be able to type in the name of the anchor so that you link to it.

    All the best,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Marc Myers
    Marc Myers avatar
    8 posts
    Registered:
    21 Apr 2010
    01 Jul 2011
    Link to this post
    My thanks for your response. I think I'm misunderstanding something fundamental

    My target page (About.aspx) contains the following in a generic content item about half way down the page:

    <a name="taxafolks">IUCN Recognized Primates and Contributors</a>

    The homepage has the following (text abbrevieated):

    The homepage contaions:
    <a sfref="[Sitefinity]9537e45c-9e2a-4f82-946b-d6a9c08bb29b" href="/About.aspx">more than 300 scientists</a>
    This generated by Sitefinity

    I change the above so the it will open the further down the page:
    <a sfref="[Sitefinity]9537e45c-9e2a-4f82-946b-d6a9c08bb29b" href="/About.aspx#taxafolks">more than 300 scientists</a>

    The validation strips my change out when I save the page.

    Am I just screwing up the html or is there something more I need to know?
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    06 Jul 2011
    Link to this post
    Hello Marc Myers,

    You can check this forum thread.

    Regards,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Marc Myers
    Marc Myers avatar
    8 posts
    Registered:
    21 Apr 2010
    06 Jul 2011
    Link to this post
    Thanks for your response. If I was conversant enough with writing code, I'd modify LinksEditorDialog.ascx to include a checkbox what would insert the necessary additional html and would also open a text box where I could enter the tag. But though I know it can be done, this is beyond my capabilities. No way I can just edit the link itself huh?
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    07 Jul 2011
    Link to this post
    Hello Marc,

    As far as I see this post reply provides the js code to do this. It is using a standard MS AJAX functions, so there is nothing specific to Sitefinity here. You can edit the links itself, but you should do it in the HTML each time.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
6 posts, 0 answered