Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Page name conditional

I want to have a variable (called 'mission_statement') appear on only one page (called 'What we do') within a folder - all the other pages will get the $sidebar text if there is any - but this doesn't work:

{$ forEach  x in (and (thisFolder) (fileName "What we do")) $}
  {$.mission_statement$}
{$next$}

Using this code, the variable appears on every page - can anyone help with a version that works? Thanks in advance,

Chas

ChasInNapa
Friday, August 22, 2003

You could try this:

{$ if nonblank .field $}
conditional-text
{$ endIf $}

In the article that you want the mission statement fill in one of the fields in that article (say extra1 or extra2).

Joel Goldstick
Friday, August 22, 2003

You could also use another template for those pages.

tk
Friday, August 22, 2003

In this case since you said you want "all the other pages to get the sidebar text" it sounds like what you want is

{$ if blank .sidebar $}
{$ .missionStatement $}
{$ endIf $}

Joel Spolsky
Saturday, August 23, 2003

*  Recent Topics

*  Fog Creek Home