anchor tag

Author Message

Bruce Morrison

Wednesday 21 May 2003 9:11:23 pm

Add an anchor
OL Editor
+ click on the anchor button, you will get a popup window that asks you
to name the anchor.
+ Enter Anchor name and click on Insert Anchor

Text
<anchor name="test" />

Link to Anchor
OL Editor
+ Click on link button
+ Enter link text
+ Select type other
+ Enter # followed by the name of the created above

Text
<link href="#test">Testing Anchor</link>

For this to work you need to edit templates/content/datatype/view/ezxmltags/link.tpl

otherwise ezurl puts a '/' infront of the #tag which redirects the browser to the home page looking for the anchor

Cheers
Bruce
and remove ezurl so it looks like

<a href="{$href}" {section show=$target|gt(0)}target="{$target}"{/section}>{$content}</a>

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

willy jansen

Wednesday 03 November 2004 5:53:22 am

Thanks Bruce but for those who find Bruce's explanation a bit cryptical (like me):

To fix it:

- open design/standard/templates/content/datatype/view/ezxmltags/link.tpl
- change the line to

<a href="{$href}" {section show=$target|gt(0)}target="{$target}"{/section}>{$content}</a>

- in the Cache admin clear "All caches"

Voila.

Cheers

willy jansen

Wednesday 10 November 2004 7:28:20 am

my apologies!
it should be

<a href={$href} {section show=$target}target="{$target}"{/section}>{$content}</a>

The

{section show=$target|gt(0)}target="{$target}"{/section}

part doesn't work
took me hours to find out why the "target" in the links suddenly didnt work anymore.:'(

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 10:59:18
Script start
Timing: Jan 18 2025 10:59:18
Module start 'layout'
Timing: Jan 18 2025 10:59:18
Module start 'content'
Timing: Jan 18 2025 10:59:19
Module end 'content'
Timing: Jan 18 2025 10:59:19
Script end

Main resources:

Total runtime0.8610 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0045 589.2188152.6094
Module start 'layout' 0.00450.0022 741.828139.3984
Module start 'content' 0.00670.8529 781.2266541.3438
Module end 'content' 0.85960.0014 1,322.570312.2031
Script end 0.8609  1,334.7734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3690160.0002
Check MTime0.00130.1504160.0001
Mysql Total
Database connection0.00050.063310.0005
Mysqli_queries0.803193.2785570.0141
Looping result0.00070.0785550.0000
Template Total0.822395.520.4111
Template load0.00210.245420.0011
Template processing0.820195.258920.4101
Template load and register function0.00010.012010.0001
states
state_id_array0.00110.122310.0011
state_identifier_array0.00150.175620.0008
Override
Cache load0.00180.2044420.0000
Sytem overhead
Fetch class attribute can translate value0.00090.103020.0004
Fetch class attribute name0.00260.298440.0006
XML
Image XML parsing0.00050.063920.0003
class_abstraction
Instantiating content class attribute0.00000.001040.0000
General
dbfile0.00070.0838160.0000
String conversion0.00000.000940.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
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 28
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs