Fog Creek Software
Fog Creek Software

CityDesk 2.0-Documentation
Scripting Quick Reference

Fields:

headline, author, body, filedDate, filedTime, modifiedDate, modifiedTime, keywords, teaser, sidebar, about, extra1, extra2, link, absLink, fileName

Loops:

{$ forEach var in (condition) $} .... {$ next $}
{$ forEach var in (condition) sortAscendBy .field $} .... {$ next $}
{$ forEach
var in (condition) sortDescendBy .field $} .... {$ next $}
Top 10 articles: {$ forEach 10 var in (condition) $}
Other sections: between, before, after, else, odd, even

Link to Next or Previous Articles:

{$ nextLink|previousLink n var in (condition) sort $} ...
{$ else $} ... {$ end $}

If Statement:

{$ if blank var $} .... {$ endIf $} 
{$ if nonblank
 var $} .... {$ endIf $} 

Conditions:

(all)
(today)
(publishDate)
(before today
or publishDate or yyyy/mm/dd)
(after today
or publishDate or yyyy/mm/dd)
(monthOf today
or publishDate or yyyy/mm/dd)
(yearOf today
or publishDate or yyyy/mm/dd)
Last 14 days: (after today-14)
(folder "foldername")
(thisFolder)
(thisArticle)
(keywordContains "
keyword")
(author "
name")
(fileName "
name")
(not (
condition))
(or (
condition1) (condition2) ...)
(and (
condition1) (condition2) ...)

Date/Time formatting:

{$ setDateTimeFormat "language or *" "dateFormat" "timeFormat" $}

dateFormat: d, dd, ddd, dddd, M, MM, MMM, MMMM, y, yy, yyyy, gg, short, long
timeFormat: h, hh, H, HH, m, mm, s, ss, t, tt

Built In Variables:

{$ publishDate $}
{$ publishTime $}
{$ today $}
{$ now $}

Forcing links to be absolute:

{$ withAbsoluteLinks "url" $}

Include:

{$ include "article" $}

CityDesk Documentation -  Home


©Copyright 2001-2003 Fog Creek Software, Inc. All Rights Reserved.