Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I wonder if there is any documentation available to learn how to use this
Thanks :-)
Comment | File | Size | Author |
---|---|---|---|
#5 | README.txt | 1.07 KB | greggles |
Comments
Comment #1
ardee-1 CreditAttribution: ardee-1 commentedI second the request!
Comment #2
johnvsc CreditAttribution: johnvsc commentedI third it .... keep it alive until have some direction :)
Comment #3
johnvsc CreditAttribution: johnvsc commentedHow to use this becomes self evident when you use it:
Follow the directions to enable the module.
When you create a new field in a Content Type, you will see an option to "Tokenize" the field. There are three choices: 1) is to disable it (you choose this, probably, to disable a tokenized field that you have enabled before.... which, logically, means that it should be the last choice....) 2) is to Replace on node views / Preserve tokens ... which means to "save" the value that exists already. and 3) Replace on node submission (which should be first, in the ui), which you would select when you are initially creating a Content Type Field.
Then you are done setting it up.
Now, when you go to create some content, you will see all of the tokens exposed for you to use in the field.
Like me, you probably thought that it would allow you to put in some content (like global $user;) when you created the for field....
Well, you can (morbus helped me with this>) in the "default" field. Say you want to return something from a global (like user ... or node) you would put this in the "default PHP code "section
That would return the users email in the field block...
I am not sure how you would get any other fields in there... maybe using the global $node.
For php newbies, you need to put global $objectOrArrayName to bring it into scope.
Cheers
Comment #4
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedI am still a little unclear.
I defined a CCK Link called it view_my_profile.
I want this to be a default value that the user cannot touch, view, or modify.
I thought that I could use tokens and enter user/[author-id] into the default field so that if I clicked on "view_my_profile" I would be taken to user/88 in other places on the site (if 88 was the author of the user for example).
But that does not happen.
I get the actual text for "view_my_profile" in my view "user/[author-id]" without any token replacement. I thought I would get user/88 if "88" was the user's uid. If set "view_my_profile" as "default to link with title", I get nothing.
if I set it to "plain, as text URL", I get the text "user/[author-id]"
Thanks,
Chris
Comment #5
greggles@activelyOUT - the symptom you describe sounds like #273294: fields must be edited twice before tokenizer works
@all - I've attached a possible README.txt file. Please let me know any advice on making it better.
Thanks!
Comment #6
gregglesI've committed that file for now.
Thanks johnsvc for your help with this.
I marked this fixed, but If anyone has more ideas on how to make it better please let me know.
Comment #7
gregglesComment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.