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

Forums / Developing with Sitefinity / Linking to areas within the same page

Linking to areas within the same page

2 posts, 0 answered
  1. Drew Peloubet
    Drew Peloubet avatar
    10 posts
    Registered:
    06 Oct 2008
    08 Oct 2009
    Link to this post
    We're creating a wiki for our site.  A lot of wiki pages have content that requires scrolling to see all information (see Wiki example) on a given topic.  Most wiki pages have a contents box at the top of the entry that helps navigate to various spots on the page.  How do I do that with the SF Wiki tool? 
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    08 Oct 2009
    Link to this post
    Hi Drew Peloubet,

    To apply scroll to a certain HTML element you should use overflow:scroll; css style. For the content section you should extend the Wiki control.

    1. You need to modify WikiViewItemList.ascx template and/or WikiViewSingleItem.ascx ( depends on which view mode you want to extend)

    2. In the repeater ( ID="repeater") of WikiItemsList template or WikiViewSingleItem.ascx RadTab you need to add a custom control that will be responsible for showing jump links to another part of the wiki. Another option is just using "Wiki Link syntax"( the topic is available when getting a content item for editing from the front end) to enter jump links in the content.

     You could also create a template for the RadEditor that will be loaded on each request - this will simplify the logic and you will not have to implement a separate custom control. You can check the following demo - Editor / Customize Content Area, Templates ( here you can create a simple table end enter the jump links)

    3. To display your custom control you need to override  CreateViewForm of the WikiView control.

    4.You should override CreateEditForm method from WikiView control and there initialize your custom control that will be used to enter the links and edit the wiki if a user has rights. Generally you could work with metakeys to persists the data in your custom form.

    These are the main steps that you should follow. I suggest using the build in RadEditor which will save a lot of coding.  Let us know if there is anything else that we can do for you.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
2 posts, 0 answered