Forums / Setup & design / anchors added before headers

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

eZ debug

Timing: Jan 19 2025 09:52:18
Script start
Timing: Jan 19 2025 09:52:18
Module start 'content'
Timing: Jan 19 2025 09:52:18
Module end 'content'
Timing: Jan 19 2025 09:52:18
Script end

Main resources:

Total runtime0.2161 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 588.9531180.8359
Module start 'content' 0.00700.0064 769.789193.9922
Module end 'content' 0.01340.2027 863.7813521.8984
Script end 0.2161  1,385.6797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00391.8203200.0002
Check MTime0.00160.7277200.0001
Mysql Total
Database connection0.00060.285510.0006
Mysqli_queries0.152370.45471410.0011
Looping result0.00160.72661390.0000
Template Total0.202393.610.2023
Template load0.00090.439110.0009
Template processing0.201393.155010.2013
Override
Cache load0.00070.318810.0007
Sytem overhead
Fetch class attribute can translate value0.00331.524110.0033
XML
Image XML parsing0.00110.501610.0011
General
dbfile0.00602.7833200.0003
String conversion0.00000.003630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0003 secs