Re: [MercerDesign] Moving listings to archive.
Hi MercerDesign,
This is pretty easy to set up if you keep both current and archived news articles in the same section. You can use "where" clauses on your viewer pages to select either your current or archived news.
If you want manual control over when your articles become "archived", you can use a checkbox field. You can even combine manual and automatic archiving by having more complicated where clauses, but let's get the simple solution working first.
Create a "news" multi-record section, and add a checkbox field to it called "archived". Generate list viewer code and paste it into two files. In one file add this line after 'tableName' => 'news':
'where' => 'archived = 0',
... and in the other file, add this instead:
'where' => 'archived = 1',
The first file will list articles which haven't been archived yet; the second will only list archived articles.
I hope this helps! Please let me know if you have any questions.
All the best,
Chris