Jump to content

Recommended Posts

Posted

Is there any way to set blog posts/pages to auto-expire or disable after a certain number of days from the original post date?

Cheers

Posted

Do you need them actually tagged somehow as expired, or could the selector in your template file just exclude all posts before a certain date?

$pages->find("created<xxxx");

or perhaps from a custom published_date field, or whatever.

  • Like 2
Posted

Probably the easiest way would be using Schedule Pages. If you need the unpublish date to be automatically set to x days after publish, you'll need to write a simple module to auto-populate the value of field 'publish_until'.

  • Like 2
Posted

Do you need them actually tagged somehow as expired, or could the selector in your template file just exclude all posts before a certain date?

$pages->find("created<xxxx");

or perhaps from a custom published_date field, or whatever.

hey adrian, yep no need to tagged them as expired, just exclude them.

  • Like 1
Posted

Easy as expected...

Date archiver sounds very interesting, too for good/speaking newspostsurls.

One simple question stands - both solutions - change parent and setup pages with date archiver:

With enabled path history module (core) are the urls/paths keep working for this pages?

Important for seo with news posts I think...

In my former cms articleaddon you could set the URL different from the logical place in backend.

Posted

The path history module should take care of those redirects for you. I haven't actually used the date archiver module, so not sure if there is something built-in to take care of this, but from a quick read, it doesn't sound like it.

One other possibility is http://modules.processwire.com/modules/process-redirect-ids/ which allows URLs to contain the ID of the page, so even if the name/path changes, the link will always work - just like the way this forum uses the topic ID rather than the title part of the url to load the page.

Posted

thanks in advice!

my first pw project is comming along - there is a not fancy newspage to setup so i'll give the /archiv/ solution a try and report.

i think for the beginning i wonna accomplish the most stuff with "onboard" technics and later go deeper with modules.....to learn first properly the system* then the scope of the hooks and modules.

*since i've done webdesign/dev as a second-job (working for a social NGO the maintime - and have a little farm at home) i'm always in lack of time especially in the summer (harvest)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...