Tokens

Events happening in the community are now at Drupal community events on www.drupal.org.

Welcome

The Token module for Drupal 4.7 and 5 exposes simple text substitution tokens like [title] and [user-name], for use in path generation, mass mailings, and many other situation where admins want to set up text replacement patterns without using PHP snippets. Other modules can expose their own domain-specific replacement tokens (like information about a purchase, or an organic group that a user is a member of) and use Token's centralized replace() function to replace token occurrences in any piece of text.

If you are curious how you might use tokens or who is using it, consider this list of modules that use token

If you want to help get Token into Core then there's the issue. Please don't just subscribe to the issue or you will lose karma points in the eyes of some of Drupal's most respected community members.

Need help in "how to give token value on form submission"..?

Posted by tarun_nagpal on December 23, 2014 at 2:18pm

Hello There,
I am facing a simple but strange issue.

I have a node form and i want a token that have the node URL that is being submitted/created. I want to send a thank you message to the user along with the node link.

Read more

Using CiviCRM fields in MailChimp

Posted by dewolfe001 on March 23, 2013 at 5:13am

I have a Drupal 7.21 / CiviCRM 4.2.2 install.
It uses CiviCRM, MailChimp and Profile2. I need to put the first name and last name from a CiviCRM contact into the MailChimp for the mailouts. What I planned on using to make the linkage is Custom Token. I didn't want to write a custom module to pull this off if Custom Token were available to do almost the same job.

Here is what I built:

<?php
if (module_exists('civicrm')) {
$user = user_load(arg(1));
civicrm_initialize(TRUE);

require_once 'api/v2/UFGroup.php';
$userID = civicrm_uf_match_id_get( $user->uid );
Read more

Easiest way to get tokens of the curently viewed node?

Posted by playfulwolf on December 17, 2012 at 10:25am

Hi,

Prehistory: I am struggling big time with built-in Drupal 7 node->comments system and decided to design my own using Entity/Reference modules.

One of the first and simple ideas I am trying is to put node add form in the node page directly with the help of Formblock module and pass the ID of that node into one of the fields (the one, where this formblock is located).

So, for this to work I need to get token of this viewed node, how?

I know, that EVA module uses similar principle, but I want to avoid using it for this task.

Read more
6 comments Categories: ,

[newbie] Simple token in textarea not being processed

Posted by davemurphy on March 19, 2012 at 10:55pm

hi folks,

firstly apologies for what is probably a dumb question. However, this has driven me to the point of madness.

Objective: in a custom content type, print the site name (or user name) using the token [site:name]

Setup: Drupal 7.10 + Token Insert 7.x-2.0 + Token Filter 7.x-1.1

Description:
I have created a basic new content type. In the Body field I insert [site:name]. When I create an instance of that content, what is printed to screen is literally [site:name] and not the name of the site.

Read more

Dynamic menu for organic groups

Posted by protoplasm on November 11, 2011 at 12:48pm

I'd like to create a menu with a link that changes automatically when in various different organic groups (6.x website). I looked at menu_token but there are no tokens for a group/nid/gid in 6.x. Is there a way to create a customized token that will work? For example, node/add/blog?gids[]=[token of group ID number]. Thanks.

Read more

Drupal 6: Send customized emails to multiple addresses from fields within multiple field groups

Posted by mjstone323 on January 26, 2011 at 1:35am

I have a multi-step form that is a job application.

On one step the applicant enters information for professional references, and on another, character references. They may add multiple references (field groups) on each page. The field groups for both types of reference include an email field, and a hidden "email sent" field.

At the end of the form, when the applicant submits the form, I wish to send customized emails to each of the references, and populate the "email sent" field with "yes".

Read more

Token for friendlist module messaging rule not working for making a link in meaasge.

Posted by pgautam on November 10, 2010 at 6:45am

I had faced a problem in making a link for a particular text on message body, It creates a placeholder for the link on that particular text.

Read more
Categories:

New releases of Pathauto imminent - help us test!

Posted by dave reid on August 10, 2010 at 2:40am

This week we'd like to release a new version of Pathauto for both Drupal 6 and 7. There have been numerous fixes for long-standing bugs with alias generation and internationalization. Oh and a few new features too (mostly in the 6.x-2.x and 7.x-1.x versions). As there have been quite a few changes made, we'd like your help testing either the 6.x-1.x-dev, 6.x-2.x-dev, or 7.x-1.x-dev versions.

Make sure when testing you have the latest development version of Token module downloaded as well.

Below are some of the major changes and bug fixes:

Read more
12 comments Categories: ,

Use page URL as Token

Posted by joerns on October 7, 2009 at 11:35pm

Hi,

I just want to use the URL of the current page as a Token with Views (for ?destination=...)
I've been searching for hours, tried different modules (like tokenSTARTER) but it didn't work.

Help! Why is it that difficult?
Thanks a lot.

P.S. Sorry if using the forum would have been better but I thought I'd better ask the guys who made it...

Read more

Tokens and Domain

Posted by David Naian on May 14, 2009 at 11:31pm

Hi, I am intensively testing Domain.module and have noticed that in the Modules that Use Token Module the Domain Access module is not listed. It would be interesting to know if there are some issues about or any kind of feedback you may know about, that may be related to the 2 modules installed togheter. Feedback very much appreciate.

Read more
Subscribe with RSS Syndicate content

Tokens

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /