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

learn more… | top users | synonyms (1)

0
votes
1answer
19 views

Pass contrib module tokens to custom event in rules

I am creating a custom rules event using hook_rules_event_info. This custom event is extending the features of the Stripe Subscription contrib module. The custom rules event is working fine so far. ...
1
vote
0answers
19 views

How can I pass values to Rules?

I would like to pass values to Rules (eg an array of words) and then do some Rules magic with them (eg create new nodes if they dont exist already). I found one solution here How to reference ...
0
votes
0answers
9 views

Display text in dropdown

My user needs to be able to create a dropdown/select list when creating a new node. So what I did was create a text field with the ability to add unlimited fields. I looked at the text formatter ...
1
vote
1answer
23 views

How do I get the fields of form attached with a content type as token?

I do not know is it possible or not. I have a content type for creating tickets. I have a form attached to content type which contains ticket state and ticket assignee fields as drop down. Now I want ...
0
votes
1answer
14 views

Can I use AddressBook values to populate a webform field?

I am currently trying to make lots of things work together. I'll try to put it simple without annoying details. I work on a lawyer's site with drupal commerce installed, as well as AddressBook, ...
0
votes
0answers
8 views

Displaying Token Field Labels From Fetched Entity In Rules HTML Email

I am sending a MIME HTML email using rules. Much of the information contained in the email comes from a fetched custom entity (custom ECK entity). Using the available replacement patterns, I can get ...
0
votes
1answer
31 views

How do I make parent taxonomy paths?

I installed Pathauto, Tokens and Entity API module in Drupal 8 and I have been unable to create a pattern that would allow parent taxonomies and then the final node for content type pages. In Drupal 7 ...
0
votes
1answer
8 views

File directory token - image field - node author

How to setup file directory where the images are saved to use tokens based on node author ? I have all setup with current user, but this is not good if moderator or admin needs to make a change with ...
0
votes
1answer
11 views

Multiple dates token for auto node title

I am using this token to create node title [node:field-date-concert:custom:j-m-Y] and it works fine if there is one value for date in node. Problem is that if there are 2 or more values i only get ...
0
votes
0answers
18 views

Is there a token for the key of a text list?

I need to get the key of the key|value pair from a text list field in a token. Say the field configuration shows the following options: no|No Way Jose! yes|Why yes, that'd do nicely! and the field ...
0
votes
1answer
11 views

What are efficient solutions to prevent a huge amount of panes in a Panel?

Using Panels for some years I still have one question that I struggle with. I have set up a Panel with a special layout, with a filter on a specific bundle type. I have more than 10 views content ...
1
vote
2answers
29 views

Views: add (link to file field) to image field

In D7, I have an event content type containing an image field ("Featured image") and a file field ("Document"). I have a view of events containing documents, and would like to wrap a link around the ...
0
votes
0answers
9 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. ...
3
votes
1answer
53 views

Can I store a computed field as a field of a Content Type?

In content type = Person, I have these fields: - First Name [node:field_person_first_name] - Middle Name [node:field_person_middle_name] - Last Name [node:field_person_last_name] - Suffix ...
0
votes
0answers
7 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
28 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
31 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
36 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
30 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
12 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
25 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
21 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
79 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
39 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
13 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
26 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
10 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
17 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
12 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
24 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
83 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
44 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 ...
1
vote
1answer
40 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
26 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
13 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
18 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
91 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
73 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
33 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
63 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
16 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
41 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
22 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
35 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
31 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
16 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, ...