Anchor link - possibility to always link to the latest version?

Comments

7 comments

  • Avatar
    Roman Serazhiev

    Hi Diana,

    do you publish versions to other spaces? Do you use Viewport?

    Could you please share your publishing set up?

    Roman.

  • Avatar
    Diana Biernat

    Hi Roman,

     

    thank you for your answer.

    We only publish the versions to one space. The versions are always published to an exisiting space as an ongoing manual. And we use Viewport (that is where we would like to link to externally, I forgot to mention that)

  • Avatar
    Roman Serazhiev

    Diana,

    with the way Scroll Versions is implemented currently, it's not technically easy to implement the ability to link to an anchor and be sure that links are working after the space was published. We have a feature request to have a better support for anchor links in versioned spaces: https://k15t.jira.com/browse/VSN-2080. Sign up for an account in our Jira to watch and vote for this issue.

    There are, however, a few workarounds I can propose. You could try linking to an anchor using the Advanced tab. You would have to provide the page title the way it would be in the published space. For example, I know that the link should point to Page A and anchor "anchor". I would edit the link on the versioned page in the master space and insert this text in Advanced tab of the linking dialogue: Page A#anchor. Like this:


    After this page and the page I am linking to is published, the anchor link should work as expected.

    Hope this helps.
    Roman.

  • Avatar
    Diana Biernat

    Dear Roman,

     

    thank you for your help. And thanks for the link to the Jira ticket.

    Unfortunately, if I do it like this:

    The link still looks like this:

    https://docs.example.com/software/latest/software-component-3/software-component-3-parameters/fsi-thumbbar-parameters#id-.FSIThumbBarParametersv18.09-autoResize

    Instead of something like this:

    https://docs.example.com/software/latest/software-component-3/software-component-3-parameters/fsi-thumbbar-parameters#id-.FSIThumbBarParameters-autoResize

    So I am afraid what I would like to achieve is not possible at the moment?

    Thank you very much in advance.

    Diana

  • Avatar
    Roman Serazhiev

    Diana,

    the link would appear as pointing to a dot page when viewing the page after saving. If you publish (or edit the page and go to the link preferences) you will see that it’s pointing correctly to the master page.

    Please try to publish and let me know if it works as expected.

    Roman.

  • Avatar
    Diana Biernat

    Dear Roman,

     

    I have published the page, but if I click on the link I created in Scroll Viewport, it links to the versioned Viewport. Just like in the example above.

    What am I doing wrong? How would an external link to an anchor look like?

    On another note, is there any possibility to use the existing headings for links instead of manually creating anchors?

    For example, in the manual above the parameters on the site are h2 headings.

    I thought I could use the heading ID to link to this, but for some reason this ID looks strange:

    <h2 id="id-.FSIThumbBarParametersv18.09-ParametersautoResizeautoResizeFSIThumbBar"><strong> </strong></h2>

    Afaik I haven't changed anything. Any idea how I can change this ID? Then I could easily link to it.

    Sorry for all the questions!

    Let me know if I should move this to a support ticket. Thank you so much.

     

  • Avatar
    Roman Serazhiev

    Hi Diana,

    would it be possible to send me a space export of the master space to support@k15t.com? I will have a look at how the anchor is created, and will try to reproduce the problem locally.

    Regarding the possibility to have links to heading without the need to add anchor macros. Yes, this is possible. There are multiple libraries that allow you to do that, for example TocBot. 

    TocBot: https://tscanlin.github.io/tocbot/.

    Roman.

Please sign in to leave a comment.

Powered by Zendesk