CityDesk Technical SupportA forum for technical support discussion related to CityDesk |
||
|
CityDesk News
Knowledge Base Documentation Terry's Tips Darren's Tips The Old CityDesk Forum Posts by Fog Creek Employees are marked: ![]() |
Hi
On my homepage, I list the three newest articles, and at the bottom there is an "Archive" link. By clicking on it, the user should get a list of all the articles EXCEPT the three that are already on the homepage. Right now the archive page lists all articles, but how can I restrict it to exclude the first n articles? Thanks for your help! Joerg
You can't do this in CityScript. But it's logical to expect an archive to contain all of the articles.
You could us a keyword. Put "current" into your current articles. Select "current" for your home page and not current" for your archive. That's not very automatic. I wouldn't do it that way. You can separate articles by date with scripts like these: This does today's and future events: {$foreach x in (and(folder "EuphonicList") (or (today) (after publishdate)))SortAscendBy .fileddate $} This does previous events: {$foreach x in (and(folder "EuphonicList") (or (today) (before publishdate)))SortDescendBy .fileddate $}
Hi,
there's no "foreach except first 3" in CityScript. But you can list all articles, give them a unique ID and hide the first three with CSS. Here's a suggestion using the filedDate and modifiedDate variables for the unique ID. Make sure you remove the linebreaks from the code, which were inserted by the discussion group. Best Regards Arend <style type="text/css"> {$ foreach 3 x in (all) sortAscendBy .filedDate $} {$ setDateTimeFormat "English" "MMMddyyyy" "HHmmss" $} div#{$ x.filedDate $}{$ x.filedTime $}{$ x.modifiedDate $}{$ x.modifiedTime $} { display: none; } {$ next $} </style> {$ foreach x in (all) sortAscendBy .filedDate $} {$ setDateTimeFormat "English" "MMMddyyyy" "HHmmss" $} <div id="{$ x.filedDate $}{$ x.filedTime $}{$ x.modifiedDate $}{$ x.modifiedTime $}"> <!-- List item for each article --> <p><a href="{$ x.link $}">{$ x.headline $}</a> <br />{$x.teaser$}</p> </div> {$ next $} |
|
Powered by FogBugz
