Internal link question

I want to create a link on a page to a heading on another page.
I don't understand how to define the link.
The information at docs.plone.org aren't helping.

The docs also say
"Plone automatically creates Anchors for headings and subheadings"
which I'm not seeing.

Thanks,
Kent

OK, I think I've figured out how to choose a page for
destination, still don't see how to link to a headline in a page ...

  1. In Control-Panel -> TinyMCE Settings enable anchor plugin.
  2. Go to a page end edit it. Then in the text editor mark a word and click the "Insert/edit link" icon.
  3. In the modal there is now a new "Anchor" tab in the navigation. You can select all headings in the page as anchors there.

Got it.
Is there a way to link to a heading in another page?

Not that I know of. But once an internal anchor is referenced, there is the anchor in the page. As a workaround you could copy the link and use it as an external link. It is not perfect, like you do not get link-integrity checks and if you rename pages or folder the link wont get updated.

OK, linking to the same page is looking like a better approach, good to have a workaround.
Thanks,
Kent

Slightly off topic, but if you enable 'Table of Contents' on a page, you will also 'get anchors' (you find it in the 'Settings tab' when editing a page).

Like this (click on the links at top to 'get the url': Chapter 1: Maritime English; Why, where, what? — K16 Textbook Maritime English. Engine Officer

It would be possible to 'hide the Table of Contents' , just to have the anchors automatically generated. (I assume the best way would be with CSS, place it 'off screen' (or maybe it can event be hidden with display: none; )

UPDATE: IMPORTANT: If you keep changing the content, this might not be a good idea, since the anchors have IDs (starting from 1), and adding a new heading will result in linking to the wrong anchor.

1 Like