Forums / General / How to link to 'eztoc'?

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

How to link to 'eztoc'?

Author Message

Maarten Holland

Sunday 26 October 2008 1:02:01 pm

Hi all,

Exponential automatically appends an 'eztoc ID' to my headers, which is great for creating a table of contents.

I'd like to use this as some kind of anchor, to link to a specific header from within other pages.

Is there a way to link to a header (eztoc) from within the OE?

Thanks a lot!

Maarten

Łukasz Serwatka

Thursday 06 November 2008 11:50:25 am

Hi,

Those anhors are used by eztoc template operator which takes ezxml block as a parameter. It generates table of contents based on the headers.

{eztoc( $node.object.data_map.body )}

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Maarten Holland

Thursday 06 November 2008 1:39:58 pm

Hi Lukasz,

Thank you for your reply!

I'm affraid I did not make my question very clear. I know about the TOC and it works great.

But what I actually ment to ask is if I can manually insert links to the anchors.

To clarify: When I'm editing a node I can insert a link using the online editor. I can link to 'http', 'eznode' etcetera. Can I also link to an eztoc-anchor that's automatically created for all my headers, like 'eznode/anchor'?

Thanks for your time!

Maarten

Łukasz Serwatka

Thursday 06 November 2008 11:13:40 pm

Hi again,

As long as you know anchor name, then you can use links like eznode://161#eztoc954_1_1

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog