About Date Archiver

Automatically archives pages based on a Datetime field (e.g. /news/2013/01/03/some-news-item/).

Category 1Admin Helpers
Admin helper modules are those that provide helpful tools, UI enhancements or optimizations to the admin panel (excluding Fieldtype or Inputfield modules).
Category 2Process Modules
Process modules are apps that run in the ProcessWire admin.
Release StateBeta
Close to stable, but users are advised to be cautious and test thoroughly.*
Authoru-nikos
Module Version1.0.0
Class NameProcessDateArchiver
Compatibility2.2
Date AddedJanuary 5, 2013
Recommended ByNew recommendations may take up to 1 day to appear.

Details

Automatically archives pages based on a Datetime field (e.g. /news/2013/01/03/some-news-item/).

Behavior

- When you add a page with a specified template, the module will automatically create year/month/day archives for it.
- When you change the date in a specified Datetime field, the page is automatically moved to the correct year/month/day archive.
- When moving or trashing a page, the module will automatically clean up empty year, month and day archives.

How to create an archiving rule

1. Go to the Setup -> Date Archiver screen in the ProcessWire admin.
2. Click on Add New Archiving Rule.
3. Specify the template that should be archived (typically the news-item template).
4. Specify the Datetime field that should be used to determine the date to archive by.
5. Specify the template that should be used for creating year archives.
6. Optionally specify the template that should be used for creating month archives.
7. Optionally specify the template that should be used for creating day archives.
8. Click Add Rule.

Tips and tricks

- Configure the archive templates that will contain other archives to sort its children by name.
- Configure the archive template that will contain the news items to sort its children by the specified Datetime field.
- You will improve usability if you dont allow the user to create date archives manually.

Instructions

1. Install the module by placing ProcessDateArchiver.module in /site/modules/.
2. Check for new modules on the Modules screen in the ProcessWire admin.
3. Click Install for the Date Archiver Process.

README

ProcessDateArchiver

ProcessWire Date Archiver Process

Automatically archives pages based on a Datetime field (e.g. /news/2013/01/03/some-news-item/).

Behavior

  • When you add a page with a specified template, the module will automatically create year/month/day archives for it.
  • When you change the date in a specified Datetime field, the page is automatically moved to the correct year/month/day archive.
  • When moving or trashing a page, the module will automatically clean up empty year, month and day archives.

How to create an archiving rule

  1. Go to the Setup -> Date Archiver screen in the ProcessWire admin.
  2. Click on Add New Archiving Rule.
  3. Specify the template that should be archived (typically the news-item template).
  4. Specify the Datetime field that should be used to determine the date to archive by.
  5. Specify the template that should be used for creating year archives.
  6. Optionally specify the template that should be used for creating month archives.
  7. Optionally specify the template that should be used for creating day archives.
  8. Click Add Rule.

Tips and tricks

  • Configure the archive templates that will contain other archives to sort its children by name.
  • Configure the archive template that will contain the news items to sort its children by the specified Datetime field.
  • You will improve usability if you dont allow the user to create date archives manually.

How to Install

  1. Install the module by placing ProcessDateArchiver.module in /site/modules/.
  2. Check for new modules on the Modules screen in the ProcessWire admin.
  3. Click Install for the Date Archiver Process.

Copyright 2013 by Niek Bosch

Comments

  • Caly

    Caly 3 years ago 10

    Has anyone tested this yet with PW 2.4?

Post a Comment

Your e-mail is kept confidential and not included with your comment. Website is optional.