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

learn more… | top users | synonyms (1)

0
votes
1answer
19 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
4 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
11 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
13 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
10 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
17 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
22 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
19 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
7 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 ...
-1
votes
0answers
16 views

how to process token's values by php?

I want to process some token values by php but it doesn't seem to let me. I have set the Text format of my input window to PHP code (enabled PHP filter in modules). Now, a simple echo "Hello ...
0
votes
1answer
14 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
19 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
6 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
78 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
27 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
11 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
109 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
7 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
19 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
21 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
28 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
27 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
12 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
5 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
24 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
38 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
62 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
72 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
19 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
131 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
14 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
10 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
43 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
75 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
54 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
17 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
19 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 ...
-5
votes
1answer
59 views

how can I resize user's picture with css [closed]

Can someone please help with the above question, I want to display [current:user-picture] using token, which has a initial size of 100x100 and resize it to 20x20 with css. But its not working. I'D ...
0
votes
0answers
133 views

Insert HTML tags into a colorbox caption (a token-enabled field)

I want to obtain custom colorbox captions. By means of Entity API (as per colorbox custom caption via field collection), I can insert various fields into the caption. The problem is that the contents ...
0
votes
0answers
5 views

Vocabulary name token in Display

How do I get the name of a vocabulary in the Display of a content type that has the vocabulary as a term reference field? If, in the label field I use [vocabulary:name] then I just get it labelled ...
0
votes
1answer
92 views

node:menu tokens not working in Pathauto

I can't get any node:menu-based tokens to work in my Pathauto replacement patterns. Other tokens, such as [current-user:name] or [node:language], work fine. But the token I am trying to use, a ...
0
votes
0answers
22 views

New to rules, want to send a custom email to myself when order is made

im really new to Drupal and I brought onto this project to learn a little bit about the development process. When a person makes a purchase on the site, and a payment is received I not only have an ...
0
votes
1answer
45 views

How to expose a persistent variable as a field for use in view

the problem I've been searching around for a while now and have not found a way to achieve this, which I find quite surprising so must mean I'm missing something. I have a particular base path ...
0
votes
1answer
24 views

Get all registered Users into a Field Type List

I would like to create a content/form where an authenticated user is able to choose another registered user from a list/dropdown. I've been searching for ways to get this done but am not able to find ...
1
vote
2answers
80 views

Programmatically changing the global site name?

I'm making a multi-site setup using the same install and the same database, basing it off domains. I'm trying to programmatically alter the site_name variable so that it displays a different site name ...
1
vote
0answers
48 views

How to use drupal tokens using token_replace

Recently i developed a module which will prompt a message to user when he logs in Hi xyz .thanks for vising the site. using drupal_set_message.Now in order for this to work i had to use ...
1
vote
1answer
48 views

Possible cause of the one time login link sent via e-mail to be broken?

edit: it appears to be a bug, reported here https://www.drupal.org/node/2329723 When I, as the Admin, add a new user and let Drupal notify him via mail, the one-time login link is broken: ...