Page 1 of 1

How to manually archive an article?

PostPosted: Thu Jul 11, 2013 10:41 am
by clockwork-design
Hi,

I have a site with news articles that my client would like to manually archive. I have used categories, one for the 'live' articles, the other for 'archived' (not using Coranto's archive facility). I have specified 2 directories, one for 'live' articles, the other for 'archived' articles. 'Live articles' use one .tmpl file, 'archived' use a separate .tmpl file.

I am using a Maginot Static profile for the articles.

When I Modify News and change the category from 'live' to 'archived' the article is copied to the 'archived' directory but remains in the 'live' directory. Is there anyway the article can be moved so that it no longer shows in the 'live' article directory?

Thanks in advance.

Re: How to manually archive an article?

PostPosted: Tue Aug 06, 2013 6:55 pm
by SrNupsen
Maginot builds static files on the server. And Coranto by nature doesn't delete files once they're built. So if you change the the build location (path) by changing one of the parameters used for constructing this path, what will happen is that the next time you build news a new file will be built in the new location (and the old one will remain untouched, as there will be no profile building to that location anymore).

Quick and dirty solution: 1) Backup in case you mess up 2) Delete all files in he live directory 3) Rebuild.

I can see you don't want to make your client do that every time, so here's a better solution:

Create a separate profile for displaying the items in the live directory (unless you allready have it working this way) Once you change the category of an item from live to archived, it will no longer show up in this list - so even if the file will still be present in the live directory there will be no pointers to it.


If you want to physically wipe the file, I believe you would have to use the first solution.