Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Can I include a URL in the Extras fields...

without CD converting it into an href? I'm building an index and want to build the href at that point, so that I can add a more meaningful link tag at that point (e.g., take a horrendously long URL and hide it behind a short label called "location.") Problem is, CD pulls in the URL, along with its own href code, so that the href code is duplicated and the resulting page breaks.

Any way to specify to CD to leave the URL as-is?

Scott McDonald
Wednesday, December 10, 2003

Yes you can,
Either 1) type the URL into the field.  Do not hit the space bar after the last character in the URL which triggers the CityDesk "auto-completion" code (converts http://... into <a href="http://...).
Or 2) Copy the URL, paste it into notepad to remove the extra codiing, then copy it again from notepad and paste it into the CityDesk field.

David Burch
Wednesday, December 10, 2003

Or you can skip the Notepad step and just use Edit -> Paste Without Formatting.

Darren Collins
Wednesday, December 10, 2003

Ah, thanks for the tip on pasting without formatting. It still isn't building correctly, though. It doesn't like something about the URL:

{$foreach x in (folder "articles")$}
      <p><a href="{$x.link$}">{$x.headline$}</a></p>
      <p><a href="{$x.about$}">Location</a></p>
      <p>{$x.extra1$}</p>
      <p>{$x.teaser$}</p>
{$next$}

With http://intranet.company.com/marketing/tools/customer_portal/roi_all.htm  in the {$.about $} field -- without formatting -- it produces the following output:

<p><a href="http://intranet.company.com/marketing/tools/customer_portal/roi_all.htm<a href="http://intranet.company.com/marketing/tools/customer_portal/roi_all.htm"></a>">Location</a></p>

Weirdness!

Scott McDonald
Thursday, December 11, 2003

You have two times "a href" in your code. CD just does what you ask it to do.

Jorgen Brenting
Thursday, December 11, 2003

Missing above: ...Two times ... One explicit and one implicit that is.

Jorgen Brenting
Thursday, December 11, 2003

If you leave off the "http:" don't you avoid autocompletion?

That is, in the about field put
intranet.company.com/marketing/tools/customer_portal/roi_all.htm

Then in your script
<p><a href="http://{$x.about$}">Location</a></p>

Ken McKinney
Thursday, December 11, 2003

i had a similar problem. the way i solved it is like this:

write/paste the url. it turns blue. select it, and hit ctrl+k (the link dialogue). click "remove link".

magic!

hope that helps. have a nice day.

gilad
Thursday, December 11, 2003

Sorry, probably not making myself clear here.

The URL in the About field is not a hyperlink, just text. In spite of that, when the foreach loop runs the extra href code is added. So I get two <a href> tags, one I specified explicitly in the foreach loop, and a second unspecified one that is added during the compile.

So to recap, the autocompletion is no longer an/the issue, it's the second <a href> tag that is added during the compile. It sounds weird, I know, but I'll bet you can replicate it easily.

Thanks for all the feedback. In the meantime, I'm looking into workarounds...

Scott McDonald
Thursday, December 11, 2003

I've done exactly what you're trying to do, and it works fine. Are you positive the code you provided is exactly what you're using? Did you copy and paste it?

Darren Collins
Thursday, December 11, 2003

Thanks Darren. You prompted me to create some additional articles from scratch, and these do work as advertised. There is no visible difference between these and the one that's been giving me trouble, but there must be some stray <a href> code lurking in the About field.

This is why I long for HTML view on the Extras tab!

Scott McDonald
Friday, December 12, 2003

Sweet, I'm glad you got it sorted out.

If you ever want to clear one of those extras fields completely, hit Ctrl-A (select all) and then Delete. That always seems to sort it out.

Darren Collins
Friday, December 12, 2003

I experienced the same problem that Scott decribed, it looks like some kind of garbage keeps hanging around in the field. Deleting and creating a new article doesn't help, the garbage information keeps around. I had to switch to another field and the change the other articles.

I didn't tried the Crtl-A, and DELETE. If I hface it again I will try it.

Aníbal Rojas
Monday, December 15, 2003

*  Recent Topics

*  Fog Creek Home