Monday 13 October 2003 7:49:18 am
Do you mean you do not know how to edit the class or how to modify the code that the code outputs? To edit the class go to your admin area and click on the 'Set up' tab and view the Classes. Click on the Edit link next to the Link datatype (mine is set up as number 11). Scroll down to the bottom of the box where it says Datatype and choose the 'Text line' from the drop down box and click on 'New'. The page will reload and provide you with some fields to fill out. For this example put 'Target' in the Name field and 'target' in the Identifier field. You could also do this with the Enum operator if you want to force the editor to select from a list. Now when you add a link to eZ publish you will see the Target field, which you can fill in with the value you want for the target (_blank for example). To output your code you will want to create an override for the ezurl.tpl file. Copy the file ezurl.tpl from design/standard/templates/content/datatype/view/
Place it in your override design directory and modify the code so it provide the target. An example might be:
{default node_name=$node.name}
<a href={concat('/',$node.url_alias)|ezroot} target="$node.data_map.target.content">{$node_name|wash}</a> {/default} Use something along these lines in your override.ini.append:
[url_with_target]
Source=node/view/line.tpl
MatchFile=url_with_target.tpl
Subdir=templates Match[class]=25 Note: The above code may require some changes to work with your set up. I wrote this off the top of my head - I haven't tested it. It may have mistakes in it. Does this help? Alex
Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]
<i>When in doubt, clear the cache.</i>
|