Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Link List

Okay, excuse my newbism, but what is the best way to do this...

I am building a big page of links.  I've setup an article per link.  Makes it easy to add, remove and have links auto-sort eh?

I put the title of the link in the headline.  No brainer.  But the HREF is somewhat more problematic!

If I put it in the Article (which I don't want to do for other reasons), or the Extra 1, Extra 2 type places the text gets clobbered with HTMLism like <p>http:://www.somewhere.com</p> where I didn't want it to do that.

I need my keywords area for filtering, so I can't put it there.

So I opted to put the URL in the author field so that I can create a link with <a href="{$x.author$}">{$x.headline$}</a> type construct.

This works, has two problems:

1. It feels icky.  I'm using Author for something that was not intended.  Its not intuitive to a new editor of the site.  Things of that nature.

2. A programmer did a "no one will need an auhtor name longe than BLAH!" and sure-enough, I've got some links who's URL exceed the aforementioned "BLAH!" value.  <sigh>

What's the best way to deal with this?

David Whatley
Monday, February 25, 2002

I've done exactly this on my site:
http://www.pool-room.com/Personal/Photography/fog0000000111.html

You can paste the link into the Extra1 field (or any other field) without HTML formatting by selecting Edit->Paste Without Formatting in the Article window. Works like a charm.

I can then create different lists sorted by topic (which I stick in the Teaser field), score (Extra2), name (Headline), the date I added them (FiledDate), etc.

On a side note, I'm worried that by using this technique I'm going to run into CityDesk Home's 500-page limit soon. I'm not sure what I'll do then, but I'm sure I won't be able to afford to upgrade. Australian dollars are worth half an American dollar, so that's AU$700 just to keep my dinky little personal site growing!

Darren Collins
Monday, February 25, 2002

I'm unable to reproduce this.

If I type a URL without hitting space, it gives me exactly what I typed.

<!-- Published by Fog Creek Software CityDesk VYQMMJRVSNNKQJFA/FAFEDBEB/6 -->
<HTML><HEAD><TITLE>asdfasdf</TITLE></HEAD>
<BODY bgcolor="#ffffff">http://www.amazon.com</BODY></HTML>

If I type a URl and hit space, it gives me the URl as a link.

<!-- Published by Fog Creek Software CityDesk VYQMMJRVSNNKQJFA/FAFEDBEB/6 -->
<HTML><HEAD><TITLE>asdfasdf</TITLE></HEAD>
<BODY bgcolor="#ffffff"><A href="http://www.amazon.com">http://www.amazon.com</A> </BODY></HTML>

If I type the URL, hit enter and then backspace, I get:

<!-- Published by Fog Creek Software CityDesk VYQMMJRVSNNKQJFA/FAFEDBEB/6 -->
<HTML><HEAD><TITLE>asdfasdf</TITLE></HEAD>
<BODY bgcolor="#ffffff"><A href="http://www.amazon.com">http://www.amazon.com</A></BODY></HTML>

I'm using the extra1 field. Here's my template:

<HTML><HEAD><TITLE>{$.headline$}</TITLE></HEAD>
<BODY bgcolor="#ffffff">{$.extra1$}</BODY></HTML>

Try typing various things into a body field and switching between Nomal view and HTML view to see what you get. When you like what you get, go to Normal view and copy/paste it into an extra1 field and see if that works for you. If I'm right, the body and extas tab fields are identical (except the body has an "HTML view" and the fields in the extras tab doesn't).

Mark W
Monday, February 25, 2002

Mark, I'm not sure if you're replying to David or me, so I'll clarify what I'm doing.

I copy the URL from Internet Explorer's address line, then Alt-Tab to CityDesk, click in the Extra1 field of the article, then select Edit->Paste Without Formatting. The link goes in, with no HTML garbage around it.

Note that if the text in an Extras field (or in the article body) only contains one paragraph (i.e. no carriage returns), it won't get <p></p> tags added to it. This caused me a little trouble elsewhere until I realised what was going on.

Darren Collins
Tuesday, February 26, 2002

I was responding to David. Your method sounds equally valid.

Mark W
Tuesday, February 26, 2002

Yeah, I guess perhaps I hit enter on something at one point and it did the <p>...</p> stuff.  I should have messed with it some more and realized I could avoid that.

But CityDesk's attempt to be helpful can often lead to trouble.  For instance the header and footer inclues I use must not have any extra HTML baggage (like <HEAD> and <BODY> of course).  But if I edit it with the built in editor, it adds that stuff automagically.....argh!

I think I just got it in my head that it would be that way with the link stuff.

I'm still not sure I want to go back and change all my links to move it to, say, an extra field.  Maybe I do....<fret>

David Whatley
Tuesday, February 26, 2002

As far as HTML baggage (like <HEAD> and <BODY>) in your articles, you might be able to control  that with an empty template.  Try creating a template with absolutely no HTML, just "{$.body}" and see if that works for your header and footer articles.

TK
Tuesday, February 26, 2002

*  Recent Topics

*  Fog Creek Home