Forums / Setup & design / anchor tag

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.:'(

eZ debug

Timing: Jan 18 2025 04:06:52
Script start
Timing: Jan 18 2025 04:06:52
Module start 'content'
Timing: Jan 18 2025 04:06:52
Module end 'content'
Timing: Jan 18 2025 04:06:52
Script end

Main resources:

Total runtime0.1572 sec
Peak memory usage4,096.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0089 590.0469180.8516
Module start 'content' 0.00900.0038 770.898493.9375
Module end 'content' 0.01280.1443 864.8359523.7109
Script end 0.1571  1,388.5469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00372.3580200.0002
Check MTime0.00150.9636200.0001
Mysql Total
Database connection0.00070.457510.0007
Mysqli_queries0.111671.02761410.0008
Looping result0.00140.91341390.0000
Template Total0.144091.710.1440
Template load0.00070.469510.0007
Template processing0.143391.181410.1433
Override
Cache load0.00050.328910.0005
Sytem overhead
Fetch class attribute can translate value0.00090.553010.0009
XML
Image XML parsing0.00040.242410.0004
General
dbfile0.00241.5248200.0001
String conversion0.00000.006830.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.0001 secs