Questions related to the Token module, or a form of token replacement system.

learn more… | top users | synonyms (1)

0
votes
0answers
13 views

Drupal 7 node save gives intermittent token validation error

When submitting a content type node I'm occasionally seeing a form validation error regarding tokens being invalid. I've tried reducing the token tree depth too using Token Tweaks which helps on ...
0
votes
1answer
20 views

Taxonomy view : add token term_name in url

I have a view overriding taxonomy term pages with the help of Panels. I defined that pattern in URL aliases : destinations/[term:parents]/[term:name]. Now I'd like to set a clone of that view, ...
0
votes
0answers
23 views

correct usage of token in href link text

I have a content type with a text field and want to use that text field as the text in the href link in a block on that page. The block appears as a button and I want to use the text field as the text ...
0
votes
0answers
9 views

display suite code - set token value of color field module as php variable an convert to rgb

$hex = "[node:field-ref-participants-category:field_color]"; print $hex; list($r, $g, $b) = sscanf($hex, "#%02x%02x%02x"); echo "rgba($r,$g,$b,.9)"; Why does $hex printed correctly, but doenst work ...
0
votes
0answers
5 views

How to get Currency module exchange value token for block?

I've recently installed the Currency module with the Yahoo! Finance co-module and was wondering how to post the current exchange rate into a block using the token system. [currency:USDtoJPY] or just ...
0
votes
1answer
23 views

Views Custom Field Handlers tokens

I am using simple views custom field handler. And I would like to make list of custom tokens for this $data array I have. How could I do that? class custom_views_handler_field_hostname extends ...
0
votes
1answer
23 views

Webform component permission

I have webform in my site, so I need to do that there are 2 user approval field components in my webform so they both should be unique value, in my case its working like if my name is joy then I ...
0
votes
2answers
25 views

Entityform redirect from query

I am struggling to get the appended parameter from the url when redirecting an entityform. I have an entityform that user can get to from multiple pages on the website. I want to redirect the user ...
0
votes
1answer
34 views

image in newsletter does not apply image style (defaults to original size)

I'm using a simplenews template (simplenews-newsletter-body.tpl.php) to output with mimemail in html. Everything works as it should except that the image in my newsletter is always taken from the ...
0
votes
1answer
31 views

How can I get the node ID inside my implementation of hook_tokens()?

I am trying to implement a custom token using the following code. /** * Implements hook_token_info(). */ function hook_token_info() { $type = array( 'name' => `enter code here`t('xyz'), ...
0
votes
0answers
12 views

How can I get Node tokens to be available for my fields

I am currently using Background Field module to set a background image and I want to set the css selector to incorporate node->nid. However it seems to not be available for me to use in my field but ...
0
votes
1answer
51 views

Shipping line items not displaying with [commerce-order:line-items]

I have Commerce and Shipping and Flat Rate installed and working correctly. Shipping is added to an Order and charged to the customer. But when I go to display the shipping line items, e.g. in a ...
0
votes
0answers
5 views

Modify a token from pathauto module

pathauto provides a hook called:[node:menu-link:parents:join-path] /** * Implements hook_tokens(). */ function pathauto_tokens($type, $tokens, array $data = array(), array $options = array()) { ...
0
votes
0answers
15 views

why can I not extract the line item from the token

I have an online store and would like to extract the purchased line item at check out for further processing in php. Now, I have enabeled tokens in my PGP Code text format and have moved processing ...
0
votes
1answer
16 views

How can I use tokens in my content

I want to use tokens in my content but it seems like it doesn't let me. I've found an article about using the Token Filter module but I have not been able to configure it so that it would print. In ...
0
votes
0answers
11 views

tokens in email doesnt work

in admin/config/people/accounts in mails, there is a Notification of comment email, so i edit in : Hi, [user:name]! [comment:author] commented on [comment:node:title]. (i took the tokens from " ...
0
votes
0answers
27 views

How to get 'default image' value of image field token?

I have an imagefield with a 'default image' uploaded and set in the field settings. When I use this image field's token, it does not return the 'default image' I'd expect to see when nothing is ...
0
votes
1answer
25 views

how to make URL aliases of nodes created via form include node title of original page?

Say I have a content type called "X", and every node of Content type "X" has a form that will create content type "Y" How do I go about setting up the URL alias of content type "Y" so it will be ...
1
vote
0answers
20 views

Use Tokens to get the title of a node a form was submitted from

I have a bunch of nodes that contain forms on them that when submitted will create further nodes of another content type. Using Token fields is it possible to have a field on the newly created nodes ...
0
votes
0answers
9 views

Auto populating the ALT & Title Fields on an Image Content Type

I have an Image content type (with caption, etc, category fields etc) which I populate with EXIF and auto label. All Fine. I would like to populate the Alt & Title fields using a token or EXIF ...
0
votes
1answer
20 views

Combine Token title with url in an email

I send emails automatically to users. There is a link in these mails, which points to a node. But I want to use the node title as an alias for this link, so that the link is not directly displayed in ...
0
votes
0answers
38 views

Creating a custom token that gets value of node fields

new to Drupal / PHP. What I'd like to do is get the value of a couple fields from a node. Then create a custom token from them so I can use them in the meta tag module. Or just get the value of a ...
0
votes
0answers
7 views

How can I insert token to Label in Rate module?

How can I insert token to Label in Rate module (path: Structure/Rate widget/Edit widget/OPTIONS/LABEL) in Drupal 7? Thank you for every response and kindness. I am Drupal novice.
4
votes
0answers
102 views

How to access values from earlier steps in multi-page Webform?

I'm using Webform 4. It uses Drupal's tokens, not it's own % tokens like it used to in version 3, and pretty much all what I found was about webform 3. Say I want to make multi-page subscription ...
0
votes
2answers
21 views

PHP snippet: why comparing the term id with a number keeps getting the wrong result?

I have a Drupal 7 site. I have this taxonomy field that I get printed out using tokens and Display Suite Module. So, if I create a "code field" at /admin/structure/ds/fields, I can type: ...
0
votes
2answers
31 views

Custom tokens in custom module

The story : I create lets say a simple module to store input data and sent a mail when you click save. Now i done the part of store data, send mail and retrieve data, but i would like to add tokens ...
0
votes
1answer
13 views

Previewable email templates token replacement

From my form_alter code, I would like to redirect to email template (Previewable email templates) $form_state['redirect'] = url('pet/email_template', $options ) The params are set as $options = ...
2
votes
1answer
112 views

What is :source in the Token module?

I look at the List of tokens and I see a lot of tokens with the same name and description, but some node have :source appended to it. Some of these, such as [node:title], I can understand, since title ...
0
votes
0answers
9 views

Profile2 fields won't show up in the profile pages after D7.34 update

After updating to Drupal 7.34, all profile2 fields won't show up in the profile pages. I have a panel inside each profile that shows all fields using tokens, where I type: ...
0
votes
0answers
30 views

Send custom (dynamic) Newsletter to specific list after creating new content with rules

Hallo to everyone and a happy new year! The case that tricks me, is the following: I want to send a custom email to all newsletter subscribers, when a content of specific type and taxonomy is ...
0
votes
1answer
26 views

Alter label with token

I am trying to build a questionnaire that simply replaces (alters) the label of a list-field. I´m doing so by replacing a token from views (embed) and using a hook_alter_form function in an separate ...
0
votes
1answer
42 views

node:id token from panel or view

I have spent 4 days looking for information on many pages without result, I would like to make a view from which to send an email with the information of a node, with view send and user view I can ...
0
votes
1answer
34 views

How can I get the group id of a node using tokens?

I try to use [node:og_group_ref], but that gives me the group node title and I need the GID, I am sure there should be a way to get it but I haven't found it
0
votes
0answers
13 views

How to enable tokens in the “Separator” field for Views Fields with multiple values?

I've got a View of Fields in Table format. One of these fields can have unlimited values. I'd like for the "Separator" field (pictured below) to accept replacement tokens, just like rewriting the ...
0
votes
0answers
6 views

Use CAS Token in Visitor Upload Form?

Use case: Provide an Upload Form where Visitors can upload documents, where the available fields are Title, File Upload and a third field to capture their Agency Code using a CAS token ...
0
votes
1answer
32 views

How can pass a data of a node's field to entityform field

I have a field named "code". This hidden field stores some alfa_numeric values. Nodes with using this data field have an entityform type as a block in page. How can I pass node's data values to ...
0
votes
1answer
49 views

File (Field) Paths serial token

I have an image field type configured to accept an unlimited number of values. Using the File (Field) Paths module I have set the file name field value to [node:title].[file:ffp-extension-original] ...
0
votes
0answers
71 views

Why, when I clear the cache, does the token list become empty?

When I clear the cache, all tokens listed in the list disappear. When I use Drush to clear the cache (drush cc all) it works fine; it doesn't show any error happens. If the token list is empty, ...
2
votes
1answer
92 views

How do I Pass a Nid to a webform and create a token for a different field on that node?

Use Case: I have a content type called "Team" which contains an email address. I have a view that creates a link to create a webform to contact the Team member and prepopulate the email address in a ...
0
votes
0answers
25 views

Views link to contextual filter multi language

Here's the issue. I have two views, one is just a block which displays all of a certain content type and the other is a page (path = /car-desc) which displays a specific node through the contextual ...
0
votes
0answers
23 views

Extract view fields with token replaced

I have a "view" that return me the JSON fields version (views_datasource is the module I use). One of this fields is a field of type "Long text" where is present 1 token [mytoken] that in the normal ...
1
vote
0answers
152 views

Drupal 7 - how to add custom field token to webform default value?

I want to add node-field data into the web from block via tokes as with Webform 7.x-4.1 this should work. But tokens from custom fields are not available in a webform(block) ? [node:title] and ...
0
votes
0answers
14 views

Tokens for multivalue imagefield in rules mail

I have a multilingual Drupal site using entity translation. I have a Content Type for products with a multivalue imagefield (Field is Language neutral). So nothing Special so far. Now i want to Send ...
0
votes
1answer
15 views

Make tokens expire

Am working on an Organic Group use case where a user can join a group using a one time invitation link sent by email. How do i make the token attached to the email link expire once its used so that ...
0
votes
0answers
13 views

Does metatags quick module use tokens

I am trying to create metatags for a clients website. I would use the Metatag module, but their version of Drupal is not complient with the current version of the module and the site is not available ...
1
vote
1answer
50 views

Render tokens in hook_node_view

I am creating the following pseudo field in hook_node_view: function user_guides_node_view($node, $view_mode, $langcode) { $node->content['field_mytest'] = array('#markup' => '<p>This ...
0
votes
1answer
96 views

Rules token one-time-login-url is showing up empty

I have a rule that, after submitting a webform, a user gets created and then sends two emails to that user. One saying their form data is being looked at by someone for review before they get a ...
0
votes
1answer
64 views

Custom formatter for a multi-valued field

I have a multi-valued image field and I'd like to use its delta value with the Custom Formatters module. What I want to do would be really simple with html+tokens if it were to work: <div ...
0
votes
1answer
18 views

User Import: Possible to use other variables in the user notification email?

We are using the User Import module to populate the User list, and having it send out a notification email with a temporary login URL. In the notification email section of User Import configuration, ...
0
votes
0answers
21 views

(current-user:points] token showing points of the full category

The token [current-user:points] showing points of the full category. Example, the token value displays the points of all articles in the article section and I had added the token in every article and ...