How to link to 'eztoc'?

Author Message

Maarten Holland

Sunday 26 October 2008 1:02:01 pm

Hi all,

eZ Publish 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

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 11:39:40
Script start
Timing: Jan 18 2025 11:39:40
Module start 'layout'
Timing: Jan 18 2025 11:39:40
Module start 'content'
Timing: Jan 18 2025 11:39:41
Module end 'content'
Timing: Jan 18 2025 11:39:41
Script end

Main resources:

Total runtime0.7014 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 587.7891152.6094
Module start 'layout' 0.00630.0033 740.398439.4297
Module start 'content' 0.00950.6904 779.8281546.3672
Module end 'content' 0.70000.0014 1,326.195312.1875
Script end 0.7014  1,338.3828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.5021160.0002
Check MTime0.00130.1889160.0001
Mysql Total
Database connection0.00090.121310.0009
Mysqli_queries0.645492.0061600.0108
Looping result0.00070.0988580.0000
Template Total0.658193.820.3291
Template load0.00250.363420.0013
Template processing0.655693.457620.3278
Template load and register function0.00020.027110.0002
states
state_id_array0.00170.235510.0017
state_identifier_array0.00140.203620.0007
Override
Cache load0.00200.2801260.0001
Sytem overhead
Fetch class attribute can translate value0.00060.088520.0003
Fetch class attribute name0.00160.222050.0003
XML
Image XML parsing0.00070.095720.0003
class_abstraction
Instantiating content class attribute0.00010.016160.0000
General
dbfile0.00070.1066180.0000
String conversion0.00000.001140.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
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs