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

learn more… | top users | synonyms (1)

0
votes
1answer
11 views

Custom Token + foreach not functionnal

I want create a custom token to retrieve all parents with a specific type of a menu item. I have created a custom module with that : function mytoken_token_info() { ...
0
votes
0answers
11 views

Getting token values from user accounts

When a customer creates a account on my website, he fill out a First Name field on his profile. The machine name for this is "field_fornavn". Can I get this field value as a token when the users ...
0
votes
1answer
22 views

Printing the last 6 characters of a field into a confirmation email

I have a booking system set up using Rooms. The customer enters their phone number on checkout, which is a 5 number area code, followed by 6 other numbers. E.g. 01234 567 890. The rooms at the ...
0
votes
0answers
18 views

Do tokens work with Rules “Set a data value”?

I have a simple Rule created in which the action is that a particular entity is created (a node) and then another action is called to "Set a data value" of one of this node's field (a standard text ...
0
votes
0answers
25 views

Show field label when using tokens in “Global Custom Text” field in Views?

How can I show the field label when using tokens in Global field in Views. To reproduce: In a view: 1) Add field: title-field and enable to "Create a label" with value "My title". 2) Add field: ...
0
votes
0answers
9 views

Calculate a date for “Scheduled evaluation date”

I'm trying to create a rule to send a email on a customer birthday. For that, I created a contact type with a date field which has day/month/birth_year. (I want to have the birth year for future ...
1
vote
0answers
27 views

What token should I use while sending email when I am programmatically adding the content?

When I fill the form. I get this email A new Event "Event name" has been created. To approve this Event please go to http://websitename.com/content/content-name and click ‘publish’. I have ...
0
votes
0answers
12 views

In Drupal Commerce, how do I include Customer Profile in generated email?

We have a customer profile called Event Registrant (that we created as custom). The Event Registrant customer profile is attached to line item called registration, allowing users to register multiple ...
0
votes
1answer
25 views

Block on user profile only

I have blocks for several profile types that links to users photos videos etc. (think myspace) With arguments it works nice, block is visible only on page created by userXY and leads to other content ...
0
votes
0answers
5 views

Cant change token for user paths

As the title says when user clicks "My account" it leads to default www.example.com/user instead of anything else i try (for example: www.example.com/userrole/username). I am using profile2, token ...
0
votes
1answer
26 views

How to set a new password using a module?

I'm sending out mails to existing users telling them their username and password with tokens. Because there is no way to access the user's password (fortunately!), I'm simply setting a new password. ...
0
votes
2answers
37 views

Links converting to plain text

I've got a function that should generate a link as such <a href="http://linklocation">Set Password</a>, which does happen, but it is generating as plain text. My guess is that this is due ...
0
votes
2answers
30 views

how to send notification to seller when payment is received

I want the system to send an email notification to the author of the product when the payment is received on their product. I have tried to run the module mp_tokens this scenario but I do not find the ...
1
vote
1answer
16 views

Is there a token I can use to display a node's view mode?

I am trying to use Rules to send an email with the results of the submission of a node. Is there any way to place the entire contents of the node using a token? e.g. [node:teaser]
0
votes
0answers
11 views

Use title attribute of image field in rule

I like to use the title value of a image field in a rule. The provided tokens for the image field do not contain title or alt attribute. I have only tokens for file:fid, file:name, file:mime, ...
0
votes
0answers
23 views

ImageField File directory token issue

I have a School Gallery Content type, It contain many of schools's pictures, and has following field: Matched School (Term Reference), the Gallery about specify school. Pictures (ImageField), ...
0
votes
0answers
11 views

How to use token context in panels?

In panels page manager there is a token context available. But when adding such token context i only see an empty settings page. How to use it?
0
votes
2answers
51 views

Webform token in emails: need example

I've got multiple web forms that email their submissions. I need to break it out into fields and keep it clean. Say, on my webform, I've got a field named zip_code. How can I print that in a token, ...
0
votes
1answer
27 views

Rules - Send mail to all addresses in email field of specific content type

I have a content type (school) with an unlimited email field (field_email). Now on creation of another node (page), I would like to send to all emails stored in the "field_email" of all school nodes ...
0
votes
1answer
17 views

Using tokens with entities?

I'd like to be able to use tokens with entities, similar to how they work for node right out of the box with core. However, for whatever reason, entity tokens are not available to me even though I ...
1
vote
1answer
23 views

XSS in Drupal 7 Views Replacement token

I am working on a Drupal 7 site that uses a replacement pattern %1 inside a View header to generate a URL with the Organic Group id(og_group_ref). The view header markup is <a class="ct" ...
0
votes
1answer
32 views

How can write reffering page node or url in a field of entity form

I have an entity form and need to know which page refered to form. How can write refferer url or node id to a field ?
1
vote
2answers
47 views

User account and Commerce addressfield bug

I found out that when I enter a "Full name" in the commerce shipping and billing address information, the [user:name] value will be changed to the "Full name" entered. As you can see the user name in ...
2
votes
3answers
129 views

Create a real taxonomy with drupal taxonomy and pathauto

I'm creating a taxonomy for reptiles in drupal and wish to use pathauto for the term url's. The problem is to find the right tokens (I do have entity token installed). Lets look at an example of the ...
0
votes
1answer
26 views

Can I export token through features

Can I export token through features from one environment to another
0
votes
1answer
74 views

Custom text output for entity reference fields

In my content type I have an entity reference field. With this field editors can create internal links effordlessly with the autocomplete function. What I want to achieve is that editors can now ...
0
votes
2answers
43 views

PHP if token is equal to in DS

I want to compare a token value with php in display suite and then change it if necessary or just print it however running <?php $tokenText = ...
0
votes
1answer
14 views

drupal remove individual paragraph tags of the tokens of my replacement patterns in a View

I want to rewrite results in a View and use replacement patterns to do this. The problem is that when I do this the 2 tokens are displayed in a separate paragraph. --> ...
0
votes
0answers
20 views

How can I display a token from contextual filter

I am trying to see if there is a way to pass basically a contextual token to a panel page. I have a panel page which displays Views blocks of content types based on contextual filter of author real ...
0
votes
0answers
39 views

Newsletter module email templates body - any way to show the email of the node author where the newsletter signup started on?

I have registered-user created/authored pages of a specific content type that I am showing the Newsletter:Subscribe block on. What I would like to do is in the Newsletter configuration -> ...
0
votes
0answers
18 views

Format a Date in email sent from privatemsg

In the email sent from privatemsg, I have a date that is being printed in ISO format. Example: [privatemsg_message:field_arrival_date] prints in the email as 2014-02-03T00:00:00. I just want the date ...
0
votes
0answers
20 views

menu link weight token

I do not see any tokens relating to the weight of a link in a menu. Is it possible to access that value via tokens? My goal would be to use it in Rules in order to obtain a custom link ordering ...
0
votes
0answers
13 views

Combing View Formatters with Custom Formatter

So I'm tearing out my eyes for a solution here. I have a view,and all I want to do for the image content is to use two different formatters effects. Example I want to use Adaptive Image formatter and ...
0
votes
0answers
20 views

Creating a multi-valued link with tokens

I think what I am trying to do is simple, but for the life of me I just can't work it out... I am trying to create a display suite code field to join two fields together. I've used tokens to do this ...
0
votes
1answer
30 views

Can Pathauto fallback to another pattern if the first pattern yields an empty path?

I want pages to have an auto generated path if they are in a menu and another one if they are not in the menu; not an empty path like Pathauto currently generates if the page is not in a menu. How ...
0
votes
0answers
51 views

What “Replacement Pattern” should I choose for Content Type / Node Type in Colorbox popup?

I am using the Colorbox module and I need the type of the content to be displayed in the popup. These are the default Replacement Pattern, [title] == Content: Title [field_event_date] == Content: ...
0
votes
0answers
32 views

Get a Image URL token

I'm using the metatag module, with opengraph and twitter cards submodule. When i compile the form, both twitter and open graph ask for an image url that now i have to insert manually. I donw't know ...
0
votes
1answer
264 views

Android to Drupal Submission : [CSRF Validation Failed] while using a cookie

The Drupal Version is 7 and the Services version is 3.4. So, My login into Drupal goes like this: Fetch a token. (POST) Fetch a Cookie using the token. (POST) Make GET Requests using ...
0
votes
1answer
51 views

Token access from module

Hi I'm trying to replace a Webform email with a token which works from the tpl file like this: $company_email = token_replace('[node:field-charter-company:field-company-email]', array('node' => ...
0
votes
0answers
30 views

Can I get the raw value of arbitrary tokens?

This site I'm working on is using tokens in such a way that the escaped (check_plain()'d) values provided by the tokens as is is problematic (they're getting double-escaped). Is there some way to ...
0
votes
2answers
63 views

How to use Token Replace only if the field has a value?

So I've been using token replace for a while now with great success in my themes. For instance I'm using it currently to show the real name of an author by using <?php print ...
0
votes
0answers
37 views

Is it possible to render multiple tokens in custom content pane?

I have created a custom content pane in a Panels layout, so that I can output a part number and short description field side-by-side as one element. I added the tokens %node:title and %node:body (the ...
0
votes
1answer
49 views

How to create a token to render nodes in content? [closed]

The goal is to place one ore more polls and/or slideshows anywhere within my blog post. Step 1 is easy: With the Token Filter module, I can place tokens anywhere in my content. Step 2 requires a ...
0
votes
1answer
63 views

Render Menu using embed token

Is it possible to render a menu in a block or a node's body using [embed] or any similar token? What I want to achieve is to render the main menu in a custom block. I don't want any solution that ...
2
votes
1answer
136 views

Product Variation Token to fetch field of Product Display (Commerce)

I am currently trying to automate some stuff, including the product sku as new products are created. For this I am using the AutoSKU module together with Token. The idea is that every product display ...
0
votes
0answers
34 views

Passing raw token to field via VBO

I have a description field for my Commerce display nodes. I have set up a custom token, e.g.- [custom:my-product-description-header], that I want to be at the top of each product display node's ...
0
votes
0answers
74 views

How to set different pathauto patterns for same content type, using organic groups data?

I have a site using Organic Groups. I would like to have the News content type use one pathauto pattern for News pages that are part of an organic group such as ...
0
votes
1answer
418 views

Create hierarchical taxonomy url alias with token term:parents using a field other than term:name

Sorry, the title is a bit of a mouthful but I will attempt to clarify. I have a question about pathauto tokens to create a URL alias for a nested/hierarchical taxonomy. Specifically, I have a ...
2
votes
0answers
33 views

Why won't Comment Notify replace the unsubscribe token in notification emails?

In short: when the Comment Notify module (under Drupal 7) sends a notification email to anyone subscribed to comments on an article on my site, it refuses to replace the token for the unsubscribe URL. ...
0
votes
0answers
88 views

Custom email subject for webform

I am using Webform 7.x-4.0 on Drupal 7.24 and I am trying to customise the email subject for my webform. I have followed the instructions as per the instructions in this post How to use ...