Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

My first "If Statement"

"If" works in SP1.  I used my first If Statement to eliminate the home link in my template:

My index.html is now an article.  The template has a "Home" link at the bottom of the page.  I don't want the home link to display at the bottom of the home page.

So, I put some text into the extra2 field of my index article and added this script in the template:

{$ if blank .extra2 $}
<A href="PTMFOG0000000013">Home</A>
{$ endif $}

It doesn't take much to make me happy.  I'm sure you clever folks will think of more interesting uses than this.

tk
Wednesday, March 13, 2002

You'll notice that the default blank site uses an if statement to eliminate the sidebar on articles that don't have one.

I'm hoping that this simple change should be enough to reduce the number of templates you need for a good site.

Joel Spolsky
Wednesday, March 13, 2002

*  Recent Topics

*  Fog Creek Home