I'm using Automatic Nodetitles with an Open Atrium install, trying to create standardized titles for what we're calling our "weekly status reports". My content type, "blog," includes a fixed vocabulary called "Entry Type", which, for now has only one term: "Weekly status report". This is NOT a multiple select vocabulary.
Very simply, i want to create a function that accomplishes this:
IF
this node has the taxonomy term, "Weekly status report"
THEN
generate this title: "Status Report for the Week of [month] [d], [yyyy]"*****
AND IF
A title has been manually entered by the user
THEN
override it with the title specified above
OTHERWISE
use the title input by user
AND IF
No title has been input by the user
THEN
throw up the default "Title field is required" error message
I hope that makes sense. I would be so very grateful for any help in authoring this function, or even a nudge in the right direction. Thanks for any and all help.
*****Better yet, the preferred title would be, "Status Report for the Week of [month] [date of the Monday of the current week], [yyyy]", but if this is not possible, the [d] token is fine.
Comments
Comment #1
gaurav.kapoor CreditAttribution: gaurav.kapoor at OpenSense Labs for DrupalFit commented