Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

More Tips

Henrik Jernevad asked for more tips....

Use this script to create section indexes. I put it in the same folder as the pages it's indexing, but it will work in any folder.

Give it a good "section index" type headline, and give it the keyword (index) then use the below as the body.

If you don't want an article in that folder brought into the page, give it the keyword (noindex).

If you have an article in another folder that belongs on this page as well, just give it the keyword (recording).

Replace "recording" with whatever is appropriate for you.

Lastly, your template or homepage should have a loop that brings in all of the (index) pages so you have an overview of the sections...

If you do a view source on this page you'll see it in all it's indented glory. Comments welcome. This is the exact script from this page: http://www.marktaw.com/recording/index.html

{$foreach x in
(and
  (or
      (keyword_contains "(recording)")
      (folder "recording")
      (folder "recording/Production")
      (folder "recording/Acoustics")
      (folder "recording/Electronics")
      (folder "recording/HomeStudio")
  )
  (not
    (keyword_contains "(index)")
  )
  (not
    (keyword_contains "(noindex)")
  )
)
sortdescendby .fileddate$}
<P><A href="{$x.link$}">{$x.headline$}</A><BR>
<SPAN class=teaser>{$ setDateTimeFormat "English" "MM/dd/yy" "hh:mm" $} {$x.filedDate$} <BR>
{$x.teaser$}</SPAN> </P>{$next$}

www.marktaw.com
Saturday, March 15, 2003

*  Recent Topics

*  Fog Creek Home