2

I need to get the value of a field that is on the "Parent page" of one of my content panes. I would like to do this through the use of tokens, and the only seemingly useful one that I can find is current-page:query:? I am assuming that I need to replace the '?' with something in order to get the field from the "Parent node".

How do I use this token, or is there another way to accomplish this.

Reid
  • 4,376
  • 11
  • 43
  • 75

3 Answers3

4

If you have a URL like

http://dev.druedu.com/node/add/answer?field_answer=161

and want the value of the field_answer token, do this

current-page:query:field_answer 
Anthony Mastrean
  • 21,850
  • 21
  • 110
  • 188
bluesky
  • 286
  • 2
  • 9
2

That's right, here another option if you are using "Clean URL" in your Drupal Metadata & Search option in your Drupal Configurations:

Args Format: For urls formatted like http://server/node/120/key use [current-page:url:unaliased:args:value:2] to return key.

More info: https://www.drupal.org/node/296453

Remember always you need install Token Module If you are using Webform 3.x you need to install a patch also; with webform 4.x everything is Ok.

Leo
  • 71
  • 1
-3

I figgured it out, I can just use the contexts in panels!

Reid
  • 4,376
  • 11
  • 43
  • 75
  • 1
    Great explanation, thank you from the dev community. – EricLavault Dec 05 '18 at 08:36
  • @EricLavault this question is old as sin, but thanks for pointing out my poor answer anyways. I have since forgotten the correct solution, or I would update, but in lieu of that, I have moved to select the top answer as the correct one. – Reid Dec 08 '18 at 18:27