Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Getting teaser shown for each top level link

I have 1 template for my whole site, with a left column for navigation and a right column for title, teaser and body.
I show only about 6 top level pages in the left navigation column, each being an index.html in a folder.
I would like to show the short teaser text in a smaller font for these 6 top level pages, to show the reader what to expect there.

I use a simple foreach loop where {$x.headline$} is a link:
{$foreach x in (keyword_contains "navbar")$}{$x.headline$}
{$.teaser$}
{next}

All generated pages show in the left navigation the proper title of these 6 top level pages, but then 6 times the teaser text of that particular page in question - not the teaser of the top level pages as they should.
One reason I could think of why CityDesk is confused could be because I also show the teaser of each individual page in the right body column of the template, which is done nicely.

Can anyone think of a solution? Thanks.

Paul Iliano
Wednesday, May 15, 2002

Not sure if it was just a typo when you wrote this question but in the code:

<<
I use a simple foreach loop where {$x.headline$} is a link:
{$foreach x in (keyword_contains "navbar")$}{$x.headline$}
{$.teaser$}
{next}
>>

you need to add the "x" to the teaser variable, e.g. {$x.teaser$}

Ian Jones
Wednesday, May 15, 2002

Ian, it wasn't a typo: I just didn't realize the importance of the x.
I just tried adding it, and the teasers now show up fine!
I must say I feel a bit stupid not to have realized this myself.
Thanks very much!

Paul Iliano
Wednesday, May 15, 2002

*  Recent Topics

*  Fog Creek Home