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

learn more… | top users | synonyms (1)

0
votes
0answers
8 views

Metatag OpenGraph for youtube video using Embbed Video field module

Like the title says i can not find a way to make Metatag Opengraph use correct tokens for sharing video content type on Facebook. My field is field:_video and i am using it in video in opengraph. ...
0
votes
0answers
5 views

Taxonomy tokens are not available in views bulk operations

I am trying to rewrite taxonomy term names and I'm using views bulk operations. I need the term name token to be available, but all I'm getting is site info tokens. I know that the order of the ...
0
votes
0answers
20 views

Webform submission tokens empty

when a form is submitted, then drupal sends a email with submission values empty. Default email template is: Submitted on [submission:date:long] Submitted by user: [submission:user] Submitted values ...
0
votes
2answers
30 views

Global view footer not replacing tokens

I am having a problem with token replacement in a views footer. I added a "Global: Unfiltered text" footer, and checked "Use replacement patterns", and added [title]. However, it shows up as the ...
0
votes
2answers
35 views

clearing cache to call hooks in .module file

I have created a token in .module file. that gives current node title. But every-time I change the title of node, I have to rebuilt cache so that updated title get reflected in my token. Of-course ...
1
vote
2answers
24 views

modify date token in View to extract only year?

We have a content type using a date field, in which the date is entered in the format mm/yyyy. An example entry might be 04/2016. In one particular View, we want to use only the Year value. It appears ...
0
votes
0answers
9 views

Social Cards for Video content type

I'm using a content type called Video with a field from Video embed field module . I'm generating an automatic thumbnail for the video using thoses modules: Imagecache Actions Imagecache Canvas ...
-1
votes
1answer
23 views

Using a rest plugin or a service how can one tell the token module the response is not cachable

I have a rest plugin which returns an array and sends a mail. When commenting the Token::replace all works fine, the token replace function creates a BubbleableMetadata object (from what I understand ...
0
votes
1answer
20 views

I need to format text with a token

I am using tokens to display a field and want it formatted with plain text: [node:body:format-plain_text] I have a feeling my syntax is wrong, how do I make it right?
0
votes
0answers
9 views

How to create default values with token for form fields

I am creating a module with a submit form, and I am looking for a way to set the default value of a form field using tokens. (The default text should be editable as well.) What is a good way of doing ...
1
vote
2answers
78 views

In views, how to create link to field visible through relationship connection?

I don’t want to link to the original piece of content (which is a join table) but to the content type which is referenced in the join table. Using: Views, Entity Reference, Entity Tokens, Token. I ...
1
vote
1answer
37 views

Date token to use user timezone instead of site timezone

Our site is having users from different timezones and we are sending event notification emails using rules. We need to specify the event date-time in addressee's timezone. So, is there any way to ...
0
votes
0answers
12 views

D7 getting another module token value in module

Please advise the best way (or at least one) to get custom tokens (actually Simplenews') value in my module token? The case is: I made an addon to SN module, which extends it by adding a new set of ...
1
vote
0answers
24 views

Metatags module not rendering tokens in content

We created custom tokens for a site and they are included in things like titles and summaries, so are picked up by the metatag module. However, when I look at search results in Google, I see the ...
1
vote
1answer
9 views

Using webform 4.x values in other fields/descriptions on multi-page webforms

Is there a way to output values of other field values in a multi-page webform? Say I have a 3 page webform. First page is name, email, then address. How can I reference the name value in the last page ...
0
votes
0answers
16 views

Drupal webform using ubercart address token as default value

I am trying to pre-populate a webform field with a registered user's Firstname, which is stored as an Ubercart address value. The available tokens are listed as: ...
0
votes
0answers
11 views

node:menu-link:parent:url:path out putting node parent ID instead

Not sure what's changed recently but [node:menu-link:parent:url:path] was working up to a few weeks ago now when I save a node I get the parent node ID in the url instead of the actual path so it ...
1
vote
1answer
21 views

How do I access the first value of a multiple value text field using replacement patters inside a rule?

For example, lets say I have a list of objects each stored as separate values of a text field. How would I access the individual values? I have tried using delta and I have tried using entity token ...
1
vote
1answer
81 views

Need to save node twice to get wanted result

I have made 2 custom tokens that I use to determine the URL alias in the Pathauto pattern. They work fine too, but since my custom tokens rely on certain (taxonomy) fields in the node, they always get ...
0
votes
1answer
41 views

Second Product variant image in fb share is not coming

I am using [node:field-product:0:field_images] metatag image. With which I am getting top level variant image always. How can I get my second product variant image in facebook share, when I select ...
0
votes
1answer
36 views

Services Module Authentication with Username and Password in URL

I have to match the following format when implementing Services to maintain some legacy APIs that were poorly written. I understand this is horrible practice and we're going to provide a new better ...
1
vote
1answer
24 views

Change date on icon click event

I'm trying to create a custom block that display the current date (Only Day of the month, 2 digits with leading zeros and A full textual representation of the day of the week) using the tocken module. ...
0
votes
1answer
12 views

Problem with token when unchecked “Enable signatures” and “Enable user pictures” [closed]

How when i want unchecked "Enable signatures" and "Enable user pictures" show those errors: The Body is using the following invalid tokens: [sito: login-url]. The Body is using the following ...
1
vote
1answer
16 views

Automatic Nodetitles IF php statement in between other tokens in title

I have an automatically generated title of an address with an if empty statement in the middle of the other tokens: [node:field_street], [node:field_number], <?php $floor= '[node:field_floor]'; ...
5
votes
3answers
85 views

Which user does the Rules module execute as?

I've set up a rule which is triggered by "after saving a new user account". This rule simply sends an e-mail. The e-mail contains various tokens, one of them is the field [account:field_country]. ...
1
vote
1answer
66 views

node:url token not returning clean (alias) URL

This is a follow-up question of: How to delay the execution of a rule for 5 minutes? When not delaying the action, the node:url token does not return the alias URL, but the URL with the token ID: ...
0
votes
0answers
40 views

Disable Token Cache

I am using hook_tokens and i have encountered a problem with this. The Hook is working good but i have one problem, i am using dynamic data and the token is always cached ( Currently using this in ...
0
votes
1answer
22 views

How to use replacement pattern in css?

Is it possible to use tokens such as [view_node] in css ? I want to display links only for a particular content type. Thanks !
0
votes
0answers
31 views

Automatically fill field values by only putting title of another node

I want to create a field in Drupal 8 where I fill in the title of another node of the same content type and automatically fill out some field values of that node in subsequent fields. For eg. I fill ...
0
votes
1answer
61 views

Automatic nodetitles and location tokens?

In a Drupal 7 site, I want to have automatic node titles taken from user contributed content. I have Location 7.x-3.x-dev (enabled Location and Location CCK) and Automatic Nodetitles 7.x-1.x-dev. ...
0
votes
0answers
14 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
1answer
34 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
21 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
27 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
16 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
30 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
15 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
39 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 ...
1
vote
2answers
47 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
131 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
28 views

Menu Token Broken [closed]

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
38 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
301 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
130 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
64 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
49 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
76 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 ...