Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

Inserting links in articles

I'm seeing a problem that happens every once in a while. Here's what I do:

  - Select some text in an article that I'd like to have link to another page

  - Click on the Link icon

  - Past the link location into the "To an external URL" text box

  - Click on Insert

And the text in my article is replaced with the URL that was just pasted into the Link dialog box. It's really wierd because if I undo the action with ctrl-z and do the same thing again, it works as expected. Anyone else out there see this problem?

- Peter

Peter Kropf
Thursday, December 20, 2001


Unfortunately I can't reproduce the problem consistently... but if it happens to you again, pay special attention to these questions:

1. When you select the word that is supposed to be a link, do you double click it or click-drag select?
2. Is this in an html file, template, or an article?
3. If an article, is it in the body, or the extras field?
4. Do you accidentally click anywhere else between the time you selected the word and the time that you pressed the link button on the toolbar?
5. After you have pasted in the link in the Insert Link dialog, do you hit return to close the dialog or press the Insert button with the mouse?

If you know the answer to all those questions, it will help in trying to reproduce the problem.

If it happens again, try closing CityDesk and trying to repeat your steps to make it happen again...

Michael Pryor
Thursday, December 20, 2001

I've encountered another issue that's similar and may or may not be related.

I've setup some articles so that the extra2 field contains a link to follow for more information. Inside a loop that processes this type of article, the extra2 field is added as a link to the headline. The html looks like:

<A href="{$x.extra2$}">{$x.headline$}</A>

But when the preview page is shown, the information shows up as:">Headline text

where the is the link, but not the ">Headline text.

If it would help, I have asimple .cty file that demonstrates the problem. Just let me know where to send it...

Peter Kropf
Thursday, December 27, 2001

Another observation here - CityDesk tries to help me out in that when it sees text entered in the form of a URL, it automatically creates a link to that URL. I think that's what's happening here. In the extra2 field, CityDesk sees a URL and automatically adds a link to it. Then when I try to use the extra2 text as a link, the link that CityDesk added is used instead and the result is what I'm seeing.

For now, I can fairly easily work around this by changing the text in extra2 to exclude the leading http:// and add that to the html. As in

<A href="http://{$x.extra2$}">{$x.headline$}</A>

Peter Kropf
Thursday, December 27, 2001

*  Recent Topics

*  Fog Creek Home