Closed (outdated)
Project:
Automatic Nodetitles
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 Dec 2007 at 13:31 UTC
Updated:
22 Mar 2018 at 09:29 UTC
Jump to comment: Most recent
Comments
Comment #1
amcc commentedI would like to know more about how to do this, i'm submitting a 'first name' and 'last name' via CCK fields using the bio module. These appear on the registration page, and i want the title of the node set to [field_first_name] [field_last_name] - it needs to do this on creation (which it currently doesn't), it works fine when updating.
I've no experience with adding actions to modules, but have some experience in making modules - so any pointers would be welcome.
Comment #2
fagoI think this isn't necessary any more due to the improvements of workflow-ng: https://more.zites.net/workflow-ng/ghop_php_action
so the action is done easily by writing the php code
However, I think there should be an example which shows how this can be used to set the node title on creation and how this can interact with ANT.
Comment #3
bomarmonk commentedWill Workflow-ng and token allow taxonomy terms to be added to node titles on creation? If so, how does this happen? Can I simply use the above code, with the correct token designation, and then voila? I'm not sure.... I currently have the 5.x.2.x dev version of workflow-ng installed.
Comment #4
bomarmonk commentedIt looks like Workflow-ng works rather well (to answer my question above). After testing, though, I am still unable to get my code to work exactly right (mostly due, I'm sure, to my lack of PHP knowledge). My code for the custom PHP title generation upon node creation:
My two troubles that I would be very grateful if someone helps me with: the "[node:field_additional_text-formatted]" is optional, so I want its inclusion to be governed by an "if this exists, then print the parenthesis." Second, if I include the "date_of_meeting-view," which is what I really want for the formatting, the PHP prints out the literal HTML characters, rather than sending the HTML to the browser as HTML.
Can someone help me alter my above code so that these two issues are fixed? And if this works, is there any need to keep automatic node titles? I guess it hides the title field, so maybe...
Thanks again!
Comment #5
gaurav.kapoor commented