Closed (fixed)
Project:
Custom Tokens
Version:
7.x-1.0-beta2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Oct 2011 at 11:02 UTC
Updated:
7 May 2012 at 13:44 UTC
Hope the solution is really simple, but I don't know PHP at all.
As field tokens are still not available for Drupal 7, I need to create a custom token to be exposed to the Rules when an entity is fetched.
I have a content type "mynodetype", with a field "field_mynodetype_myfield".
How to write a custom token for this case?
Comments
Comment #1
gaspaio commentedI don't know if this will help, but if you need a token that evaluates as the value for a given field, you can create a custom token that depends on the node object (type = node) with code like this :
You probably want to add some checks :
Does this help you ?
Comment #2
gaspaio commented