Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Loop question:

I wrote following code in a template. Unfortunatly it only prints out every other article headline, instead of printing them all. Please Help:

<div id="footer">
{$ forEach article in (folder "/fuss")$}
  <td><a href="{$article.link$}">{$article.headline$}</a></td>
{$between$}
  <td>|</td>
{$before$}
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr>
{$after$}
    </tr>
  </table>
{$next$}
</div>

Maurice Fäh
Monday, May 24, 2004

Well, I solved it...kind of.

Solved, because:

There was no text in the headline field. So nothing could be published.

kind of, because:

In the Citydesk manual, it says that "As a convenience the name you type (for the article) will also become the initial headline for the article...But this is not always the case, which is why the headline field stayed empty.

What am I doing wrong? Thanks in advance for your help!

Maurice Fäh
Monday, May 24, 2004

This happens on one of my PCs. I've told FogCreek. When I create a new article - I don't get a headline. If I create it them move it into a fold, the headline magically appears. I don't understand.

On my other machine, the headline works perfectly as expected and documented.

Report it to FogCreek. I thought it was just me.

tk
Monday, May 24, 2004

Hi tk

I assume that Fogcreek is monitoring this forum...:-)

Maurice Fäh
Monday, May 24, 2004

I would guess that they do as well but ... it's a discussion forum - you report bugs to the vendor.

Perpetual Newbie II
Monday, May 24, 2004

Hi Perpetual Newbie II

tk already did report it to them already, so I'm sure they will fix it, if it's a bug.

Sincerely

Maurice Fäh
Monday, May 24, 2004

Maurice,

The more people to report a bug, the better, because it gives them an indication of how widespread the problem is (and might just remind them that it still needs to be fixed).

David Burch
Monday, May 24, 2004

Alright :-)

Where exactly do I have to report this?

Maurice Fäh
Tuesday, May 25, 2004

Report it by going "Help" "Send Feedback."

This came up again with one of my clients. He crated two new articles, niether had a headline. I created the file initially on my PC and the headline thing worked fine. He's added articles in the past with no problem. But this week he has to problem.

tk
Tuesday, May 25, 2004

Done :)

Maurice Fäh
Tuesday, May 25, 2004

One thing I'm thinking of doing is getting rid of the behavior that the initial name which you give the article becomes the headline. Instead you'll simply have to type your own headline. It's much easier to understand the behavior that way... I think currently what happens is that many new users assume that the article name IS the headline, because it acts that way for new articles, but as soon as you rename an article, the renaming doesn't stick, which seems broken to people... Anyway I would like to take some of my own UI advice and make the behavior simpler and more consistent. If you don't like typing the name and the headline for every article there's nothing to stop you from using the filename as the headline if the headline is blank in your templates:

{$ if blank .headline $}.fileName{$ endIf $}
{$ if nonBlank .headline $}.headline{$ endIf $}

That way you can leave the headlines blank unless you want a headline that is different than the fileName.

Does this make sense?

Joel Spolsky
Fog Creek Software
Friday, May 28, 2004

Dear Joel

Thanks for your reply.

>One thing I'm thinking of doing is getting rid of the >behavior that the initial name which you give the article >becomes the headline. Instead you'll simply have to type >your own headline. It's much easier to understand the >behavior that way...

I would agree with that.

>I think currently what happens is that many new users >assume that the article name IS the headline, because it >acts that way for new articles, but as soon as you >rename an article, the renaming doesn't stick, which >seems broken to people...

I'm sure this can happen. But I don't think that's what was happening to me. Because then there would still be the initial article name in the headline field, which wasn't the case. The headline field was just empty.

>If you don't like typing the name and the headline for >every article there's nothing to stop you from using the >filename as the headline if the headline is blank in your >templates:

>{$ if blank .headline $}.fileName{$ endIf $}
<{$ if nonBlank .headline $}.headline{$ endIf $}

Great suggestion.
Thank you!

Maurice Fäh
Saturday, May 29, 2004

Yes, I think getting rid of the default makes sense.

Ken McKinney
Saturday, May 29, 2004

*  Recent Topics

*  Fog Creek Home