Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-09-20 19:46:27

reno
New Member
Registered: 2010-07-19
Posts: 6

How can I change my article's section?

Hi

I would like textpattern to change automaticaly the section name of my article when the date is expired.

Is it possible and how??

Offline

#2 2010-09-20 20:49:57

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: How can I change my article's section?

This certainly isn’t built-in functionality. Furthermore, Txp itself only springs to life when a page is requested, on either the public or admin side; depending on the site’s use pattern it might or might not be a good solution to code the check/update into Txp (it would be as raw PHP, of course). You could schedule a cron job once per day to check for any expired articles not in the “expired” section.

There’s probably a pure Txp solution to achieve the same end result, i.e. control in which contexts these articles appear: set your site prefs to publish expired articles, then use if_expired tags for control over where these appear.


Code is topiary

Offline

#3 2010-09-21 19:07:44

reno
New Member
Registered: 2010-07-19
Posts: 6

Re: How can I change my article's section?

Yes but with if_expired , i cant do anything like section=“published” if_expired section=“expired”

Offline

#4 2010-09-21 19:42:05

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: How can I change my article's section?

I don’t understand your example. What is it you want to accomplish? I mean from a public-side point of view: what end result are you trying to achieve?


Code is topiary

Offline

#5 2010-09-23 15:21:54

reno
New Member
Registered: 2010-07-19
Posts: 6

Re: How can I change my article's section?

I have an post an article in a section ( future) and when the date is expired, i want the section to change to another section ( passe )

Offline

#6 2010-09-23 17:05:31

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: How can I change my article's section?

Is that just for displaying the article on another section page? You should be able to do that with an article_custom tag, or am I missing something?

Offline

Board footer

Powered by FluxBB