We would like to display a node's workflow state 'Name' as part of contemplate. Looks like we can only easily the workflow state ID and other fields through this interface. How can we access the state name?

I suppose some custom PHP would resolve the issue, but I'm not an expert in PHP. Any thoughts?

Comments

jrglasgow’s picture

I guess the first question is this: What do you mean by "workflow state" ?

Do you mean whether it is published or not?

stacysimpson’s picture

Sorry, the workflow and state concepts provided in this module: http://drupal.org/project/workflow

stacysimpson’s picture

Found a good utility method, workflow_get_state() in workflow.module. Somehow I missed this the first time.

stacysimpson’s picture

Status: Active » Closed (fixed)
tpainton’s picture

Hi, I'm trying to do the same thing. I am a novice at drupal, can you elaborate? I know how to use contemplate but I see that the only thing I can retrieve is the workflow state id, not the workflow name. I just want the workflow state to be displayed in the node body so users don't have to click on the workflow tab. THANKS!

freddyseubert’s picture

subscribe

Edit: I found this one in the issue queue of the workflow module: http://drupal.org/node/107138#comment-487291