I have this set as my manual title for a panel page:

%node:field-maincourse %node:title

the field "main course" is defined as a decimal field with a scale of 3 (i.e. 3 digits to the right of decimal point)

but the title only shows 2 decimal points.

as a test i also add that field as std pane content so that you can see it really does have 3 (since pane content formats correctly).

http://screencast.com/t/BCFXntOOp

Comments

merlinofchaos’s picture

Project: Panels » Token
Version: 7.x-3.x-dev » 7.x-1.x-dev
Component: Panel pages » Code

Token.module provides field tokens which we just pass along.

dave reid’s picture

Status: Active » Closed (works as designed)

Token uses the 'default token formatter' with fallback to 'default formatter' in the field type's hook_field_info(). If you want to change how a field token is output, enable the 'Token' view mode on your content type's 'Manage display' tab, and then select the formatter you want.

liquidcms’s picture

Status: Closed (works as designed) » Active

cool, except my available modes are:

Full content
Teaser
RSS
Search index
Search result

nothing about Tokens

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)

You'll need to make sure you're using the latest D7 beta release of token and clear your caches for it to show up.

liquidcms’s picture

i did have Sept 6 dev release. cleared cache and sure enough; i do now have a display mode for Tokens.

enabled, set it to 3 decimal places, save, cleared cache again just for the fun of it.

no impact on the panel page title.

so i am leaning towards this is bug in Panels. i will get around to tracking it down (hopefully in next week or 2); just wanted to report the bug for now.

dave reid’s picture

Actually, looking at your original post, are you using Entity tokens (which uses dashes in its field token names)? Try using %node:field_maincourse maybe (which is the Token module-provided token).

liquidcms’s picture

Project: Token » Entity API
Version: 7.x-1.x-dev » 7.x-1.0-beta10
Component: Code » Entity tokens
Status: Postponed (maintainer needs more info) » Active

yup, that works. so i am moving this to the Entity module which seems to have the bug in it

fago’s picture

Status: Active » Closed (works as designed)

Entity tokens does not use display formatters but just outputs plain data - this is by design.