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

learn more… | top users | synonyms (1)

0
votes
0answers
8 views

Save image using a token works wrongly

I have a Feeds Importer which import node from a xml remote document. The content type I importing the nodes to has a multivalue image field and in it I set to rename the file name to: ...
0
votes
0answers
9 views

Page_node_token module does it ring a bell? [on hold]

More a trick than a question… I am currently working on a french website promoting learning content. I need to let the user browse the programme and register to an upcoming session. Long story ...
0
votes
1answer
13 views

Token for field in field collection

I have a field collection with 3 fields (title, image and link). I'd like to link the title and image to the value of the link field. I'm using the linked field module to make the fields linkable and ...
0
votes
1answer
15 views

How to translate metatag token into text?

I'm trying to get the data from metatag using node_load and for some reason when is using the default field, which is Token it gives me this ugly array. Instead of title and description that ...
0
votes
0answers
15 views

Views/Twig/token error when trying to enter a custom URL

I'm creating a view that shows a list of "articles" with a contextual filter, "organization", to be shown as a block in the organization detail page. I configured the filter so that it grabs the ...
1
vote
1answer
10 views

What replacement token to use for counting a specific content-type

I have a content type of 'partners', and I wanted to create a body text like 'Currently we are working with X partners'. I have token-filter working, but I cannot find a token that allows me to choose ...
0
votes
1answer
23 views

html entities privatemsg token

I am using the privatemsg module to send messages and mails with questions about plants. The subject is automatically filled in with the token of a node title, which is always a plantname. They always ...
0
votes
0answers
11 views

Token for default contactform subject

Is there a way to automatically fill in a subject in a personal contactform when clicking on a mail button in a view table. The privatemsg module can do that with tokens, that is exactly what I want, ...
0
votes
0answers
23 views

Something preventing redirect from being executed

I'm using d7. I've a flag "I have a solution" attached to a "problem" content type When an user flags it a rule is fired. Actions are: 1 - create a new "solution" content, name it ...
0
votes
0answers
17 views

How to Produce a Valid Token

I'm trying to create a custom token. I've already successfully implemented hook_token_info, and the token shows up. However, whenever I insert a the token [site:chosen-school-year] wherever I'm able, ...
4
votes
1answer
32 views

Rules scheduled email empty when using php variable, but not when hardcoded

I'm using rules scheduler (on D7) to set up a reminder email based on a time specified within a commerce order (more specifically a line item in the order). I was able to get everything set up ...
0
votes
2answers
35 views

Views, Taxonomy, Tokens and URL

I am building a website for multiple summer resorts. I am now concentrating on the restaurants section. I have a content type - Restaurant. It has multiple fields but I will just put down the ones ...
0
votes
2answers
30 views

create a custom node token

I want to create a new token form the selected item in the list box of currently submited node and set it as url alias of the node. unfortunately, I need keys of select box as token but default ...
2
votes
2answers
124 views

In using the rule “OG new content notification,” (rules_og_new_content) how can I insert the group name in the outgoing email

In using the rule OG new content notification (admin/config/workflow/rules/reaction/manage/rules_og_new_content) for a site using Organic groups. However, I'd like add in the name (and URL) of the ...
1
vote
1answer
25 views

Menu Token Broken

I have been looking around for an answer and haven't found an answer, so if this is a duplicate, let me know and I'll delete it. My menu token module no longer works, even with the same settings. I ...
0
votes
1answer
31 views

How to seperate products images folders based on product display categories?

I am building a drupal 7 commerce site, I have installed inline entity form module and adding products from inside the products displays. Since I will have thousands of product displays and products, ...
3
votes
2answers
190 views

How to use tokens in a node?

I added a new content type. How can I use tokens when editing a node of that content type? For example, if I put "Hello [user:name]", the page shows the following: As shown above, the ...
2
votes
1answer
85 views

Why is the token in my custom module not replaced?

I want to use the token [user:name] in my module. This module contains a sample ControllerBase class In my class I test this: class Page_test_Controller extends ControllerBase { /** * ...
0
votes
1answer
49 views

Rules flag on flagging flag

I got a "flag A". this flag can be flagged with "flag B". I would like to send an email via the Rules module to the flagging-user of flag A, when flag A has been flagged with flag B. My problem is I ...
0
votes
1answer
23 views

Custom date formats in webform emails

I have a webform that sends an email. The webform has a date field and I need to format that date field. I have tried: [submission:values:date_field:CUSTOM_FORMAT] ...
0
votes
1answer
39 views

Webform token for select field value (not key)

I have a webform select field called tour and I have set up an email to go out, using the default template: Submitted on [submission:date:long] Submitted by user: [submission:user] Submitted values ...
1
vote
1answer
29 views

Timefield [entityform:field-name:value_formatted] token not working in Rules

I am having troubles using token replacement for the Time field field type provided by the module Timefield in Rules. The token pattern [entityform:field-name:value] works just fine (it gets ...
0
votes
1answer
27 views

Different behaviour saving programatically vs UI

I am having a problem saving nodes programatically. I am attempting to save nodes that use the following pathauto pattern for an alias: ...
1
vote
0answers
19 views

Registration email token outputted as link instead of plain address

I am using Entity Registrations for user registration to events on my Drupal 7 site. After the Registration i want to send an email to the registrant, with the Rules Module. So i need a token to get ...
2
votes
1answer
55 views

How to add an ascending row number (using some token) in front of each row in Views?

I can't figure out how to make a soccer league table that would look like this: http://prntscr.com/8va7h7 This is how the table looks now: http://prntscr.com/8va8eu Everything works but I don't know ...
1
vote
0answers
23 views

How to translate a custom token in rules, private message, and other modules

I made a custom token to use as an email signature in emails sent by the Rules module and private messages (sent using Private Message). I defined the token as follows: else if ($type == 'site') { ...
0
votes
0answers
9 views

token has wrong output format

I'm using Webform Charts. If I try to call Webform Chart token [node:webform-charts:my_data] on conformation page, it results false formatted output and can not be shown. I think it's because ' is ...
1
vote
2answers
62 views

Is it possible to use standard tokens in a views field? [closed]

I am using Drupal 7.38 and Views (7.x-3.11) to show fields. I can't seem to get standard token replacement working for text fields, e.g. [node:created] is not replaced with the relevant value. This ...
0
votes
0answers
11 views

How do I troubleshoot the token module?

I seem to be having some trouble with the token module on my site. I'm running 7.x-1.6 on Drupal 7.39. An account was created for you after your order at I Liq Chuan. You may now log in by ...
0
votes
1answer
31 views

Most efficient way to replace token string with multiple sources

I maintain FillPDF. When filling in a PDF, I evaluate token mappings to determine the data to send to the PDF. One thing that can happen is that the user supplies multiple data sources (generally of ...
2
votes
1answer
34 views

Should I use underscore or hyphenated tokens?

When displaying tokens that can be used I often see this type of thing: I have seen that there are a number of d.o issues on this; one in particular is extensive and detailed. But is there a reason ...
0
votes
0answers
6 views

Change date field's default token “[node:field-lift-date:default]” to supress “time” value

I am using a token from date field "[node:field-lift-date:default]" to generate part of a page title for a content type. The issue is I want to suppress the "time" part that is outputted. For example ...
0
votes
2answers
66 views

How to format a date submission value of a webform?

I need to format a birthday submission value to the short format (01.01.2015) defined under admin/config/regional/date-time on a webform. This Token is working but it uses the long format (Fr, ...
0
votes
1answer
29 views

How to prevent empty token from showing

I want to capture a value from the url and display it in a piece of content, if available. In my node body I enter text like: The sid is "[current-page:query:sid]". If I then view that node at ...
2
votes
1answer
52 views

Webform / add hidden field with token

When adding a hidden secure field to a webform it does not show up in markup. Both for default value and tokens. Secure value (allows use of all tokens) If I choose a hidden element it is ...
0
votes
1answer
16 views

How to put a token in field Simplenews -> Subscribtion block -> block message

I want to add a token in a field which is used when the simplenews module is installed and configured. There is then a block available for each newsletter. In this block the user can fill in his ...
0
votes
0answers
24 views

Entity reference based tokens don't work with FileField Path

When I try to set up file path using FileField Paths module, entity reference tokens like [node:og-group-ref] don't work, nothing is returned. I tried to enable and disable all file path options, but ...
0
votes
0answers
10 views

Programmatically adding content - pitfalls that can break other parts of the system (e.g. tokens)?

I have a website for which I programmatically added content. First, I deleted existing taxonomy and content. For taxonomy, I deleted via a series of calls of the form taxonomy_term_delete($term); ...
0
votes
0answers
33 views

How to get token [current-page:url:absolute] available in view?

I have a view. In there is a field containing an url. This url I want to extend with &u=[current-page:url:absolute]. So i put into the rewrite output of this field: [field_flag] But the token ...
1
vote
0answers
39 views

Address field tokens and Country display

I asked this in the Address Field Tokens issue queue, but didn't get any response. Maybe someone here has a thought... I have some user profiles with address fields attached. I've created a view of ...
1
vote
1answer
49 views

Token to show only first term in Page Title module

I am using Page Title module and patterns to auto create them. One of the tokens for Page Title when creating content is taxonomy term. Since users can add as many terms in content i would like to ...
0
votes
1answer
20 views

How to call function in mail which is configured using Rules in drupal

I want to call function in mail body. I am using Rules modules for sending mail on some event triggers. anyone have idea, how can i achieve this?
0
votes
0answers
17 views

Tokens keep 'disappearing', drush rr fixes the website for a time, sometimes hours sometimes seconds

As title suggests my problem is missing tokens, at random intervals tokens will just cease to work on the site in question which makes any webform entries that are emailed out to a client appear ...
1
vote
2answers
39 views

Edit token template

I am using "Send mail with Variable" module and my variable contains the token [commerce-order:commerce-email-order-items], which returns me <table style="width: 50%;border: 1px solid #ddd;">. I ...
1
vote
0answers
11 views

Getting a node-uniqe identifier such as node id or path as replacement pattern at node creation

I have a content type which consists of a large text field and a number of file fields. Users are allowed to /node/add instances of this content type and are then expected to upload all relevant files ...
0
votes
1answer
75 views

How to get the site url in views custom output

I want to print the site url in views field with a custom output, I tried [site:url] token, It doesn't work. I already have entity token and entity_token enabled in my site. Is there a way to do that ...
1
vote
1answer
103 views

Master page and details page for Views

I have created a new content type and I called it Opinion. Then using views, I have created a page with path /opinion to be a view for all nodes of type Opinion listing i.e. a master page. The ...
0
votes
1answer
46 views

How to enable tokens for custom entity?

I had the impression that in Drupal 8 all entity tokens are provided automatically since it uses the new field structure but I don't see anything available for my entity. Do I need to enable ...
0
votes
0answers
15 views

How to iterate over drupal tokens with php? Specifically how to format the result of a mutli-value [submission:value:?] token

I'm starting to mess with the webform-mail.tpl file, and I'm wondering if I can use the webform tokens in code? Specifically, one of my tokens is based on a webform_select_options_info() function, ...
1
vote
1answer
35 views

Refresh [account:one-time-login-url]

I have a module that creates a new user and automatically logs //set up the user fields $fields = array( 'name' => $login, 'mail' => $to_insert['email'], 'pass' => user_password(10), ...