Forums / Setup & design / anchors added before headers

"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".

anchors added before headers

Author Message

Matt Gifford

Tuesday 22 July 2008 8:04:17 am

Hi all.

I've noticed that anchor tags are being added before the header tags in any content I place in:

<a name="eztoc250_0_1" id="eztoc250_0_1"></a>

Why is this happening? How can I turn it off?

Many thanks

André R.

Tuesday 22 July 2008 1:05:25 pm

It's coming from the content/datatype/view/ezxmltags/header.tpl,
just override that template in your own design (place a copy in the same position in your design) without the eztoc part:

<a name="eztoc{$toc_anchor_name}" id="eztoc{$toc_anchor_name}"></a>

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Emmanuel Courmont

Friday 29 August 2008 3:31:41 pm

Hi,

I would like to use these anchors (name and id) to create a table of content.

In other words, I have an XML block with headers. The template will display the list of header (level 2 for example) link to the anchor auto-generated by the template.

I could get the anchor and heading name looking through the attribute and generate the list of links, but it's not really nice...

Is there any other way to generate a table of content from an XML block ?

Emmanuel Courmont

Monday 01 September 2008 9:36:49 pm

Okay as usually, it's easy when you got the right "operator".

see http://pubsvn.ez.no/nextgen/trunk/doc/features/3.8/TOC_operator.txt

It works fine with eZP 4.0