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