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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 16:20:04
Script start
Timing: Jan 18 2025 16:20:04
Module start 'layout'
Timing: Jan 18 2025 16:20:04
Module start 'content'
Timing: Jan 18 2025 16:20:05
Module end 'content'
Timing: Jan 18 2025 16:20:05
Script end

Main resources:

Total runtime1.2551 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 589.0313152.6250
Module start 'layout' 0.00550.0034 741.656339.4453
Module start 'content' 0.00891.2446 781.1016576.6719
Module end 'content' 1.25350.0015 1,357.773412.1641
Script end 1.2550  1,369.9375 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2626160.0002
Check MTime0.00140.1128160.0001
Mysql Total
Database connection0.00100.077110.0010
Mysqli_queries1.202095.7729620.0194
Looping result0.00070.0559600.0000
Template Total1.218197.120.6091
Template load0.00210.168220.0011
Template processing1.216096.884820.6080
Template load and register function0.00020.013010.0002
states
state_id_array0.00190.148110.0019
state_identifier_array0.00170.137620.0009
Override
Cache load0.00170.1376230.0001
Sytem overhead
Fetch class attribute can translate value0.00070.056130.0002
Fetch class attribute name0.00120.093350.0002
XML
Image XML parsing0.00080.062630.0003
class_abstraction
Instantiating content class attribute0.00000.001250.0000
General
dbfile0.00080.0610170.0000
String conversion0.00000.000540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs