Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
auto-increment a custom-field (custom Id for articles per sections)
Hello Txp users,
In a personal project manager/todoList application build with Txp, I use 2 distinct sections for define the 2 contents types
- Project: create a new project
- Task: create a new task.
Created projects and tasks are stored in Textpattern table, it’s not ideal: both share ID column incrementation.
I would like projects and tasks that have their own ID.
I don’t want to replace the logic of textpattern (URL etc.), Just adding a new auto-increment column but in relation with sections.
A idea ?
Offline
Re: auto-increment a custom-field (custom Id for articles per sections)
Hi,
a plugin that is fired on article.save, test wich section is the article and then select the max number of the custom_field then write the value+1 on the desired custom_field.
Si c’est pas claire, je me comprends!
Cheers.
Offline