Addressfield Tokens


Overview

The addressfield_tokens module extends the addressfield module by adding full token support. It also adds some convenient addressfield formatters and provides a webform addressfield integration.

Features

Tokens

  • Attaches tokens to every addressfield type within every entity.
  • Creates a token for every addressfield component, including name, organization, thoroughfare, premise, locality, postal_code, and country.
  • Allows token names to be configured for your locale (e.g. "thoroughfare" could be displayed as "Street 1" in the token table).
  • Creates additional tokens:
    [addressfield:city-state]:
    City, State
    [addressfield:full]:
    Full address with formatting.
    [addressfield:text]:
    Full address without formatting, all on one line.
    [addressfield:country-name]:
    The full name of the country.
    [addressfield:state-name]:
    The full name of the state (applicable for countries where states have abbreviations selectable from a select list).
    [addressfield:mc-address]:
    A full address with each component separated by double-spaces, compatible with the MailChimp API.

Here's an example of the all the provided tokens, with locale customizations for the U.S.

Field Renderers

City, State:
The city and state separated by commas, with the country appended if not the default country.
One line:
The full address without formatting, suitable for display in CSV export views.
Country:
displays only the country.
State:
displays only the fullname of the state or administrative area.
Components:
select which components of the address should be displayed, and the separator that should be used between them. The components include both the abbreviated and full versions of the state and country.

Web Forms

  • Integrates with webforms to create address fields.

Theme functions

theme_addressfield_formatter:
Renders an address using the default generator associated with the given handler (the ctools plugin name).
theme_addressfield_formatter__citystate:
Renders only the city, state and country separated by commas
theme_addressfield_formatter__linear:
Renders each of the addressfield components as single line, separated by commas.
theme_addressfield_formatter__components:
Renders any of the address components, separated by a given separator.

Each theme function can also be overridden per country. For instance, theme_addressfield_formatter__citystate__us

Dependencies

Integrates with

Credits

This module is provided by New Signature.


Addressfield Tokens项目的Drush安装命令:复制到剪贴板

注:个别模块仍需开启相关子模块。
周安装量: 
8937
维护状态: 
最低限度维护
开发状态: 
仅修复BUG,不添加新功能

推荐版本下载:

版本下载地址发布日期发布说明翻译下载
7.x-1.5tar.gz (16.46 KB) | zip (19.27 KB)2014年10月30日发布说明简 | 繁 | 更多

开发版本下载:

版本下载地址发布日期发布说明翻译下载
7.x-1.x-devtar.gz (16.74 KB) | zip (19.62 KB)2015年5月29日发布说明简 | 繁 | 更多