Problem/Motivation

Unlike other entities, Fieldable Panels Panes do not provide the expected keywords, based on the built in context for the FPP entity, for insertion into the content settings. For comparison, when customizing a Panelizer display for a node a whole host of keywords are available for each of the properties and fields on the node. However, with FPP all that is available is a single keyword "%fieldable_panels_pane".

Proposed resolution

Remaining tasks

User interface changes

API changes

Original report by @algazaras

I am struggling to call a node field (%node:field_documentacion) from one of the fields of a fieldable panel pane. Is this possible at all? I am using Full HTML for that field but I don't find an equivalent option to the Custom content panes "Use a context keyword".
Maybe being the fieldable pane a separate entity I should use a different syntax?
Thanks a lot for any help

Comments

merlinofchaos’s picture

Status: Active » Fixed

You want one field to refer to another field using a token? It sounds like you might want the token_formatters module.

algazaras’s picture

Thanks merlin, but that didn't do it. Maybe the error lies in my approach, I'll try to explain it so maybe you can better help me. I have a content type with many different fields. I would like to organize all that info in squares, depending on its nature. Therefore, I need three fields making each group which I can work with with CSS, and which will show for every node of that content type.
That's why I chose fieldable panels panes, but the problem arises when I try to call those fields (from the original content type) from the fieldable panel pane, using for example %node:field_description . This syntax works fine from a custom content pane, but not from the fieldable panel pane.
With the token_formatters module I was only able to reference a specific node.
I'll thank you very much for any orientation

merlinofchaos’s picture

merlinofchaos’s picture

Ultimately the problem here isn't really related directly to fieldable panel panes -- it's an issue with fields in general. You want the text in one field to be able to reference tokens in other fields, I'd be shocked if there isn't a contrib solution for that *somewhere*, but the problem is finding it.

algazaras’s picture

Hello again,

I have installed the token_filter module, and I was quite close to getting it right. I don't think the problem is with fields, but rather with the tokens regarding nodes. I say so because [current-page:title] and [date:long] both work, but neither [node:title] nor [node:content-type:name] do.
It seems there have been some people with the same problem as me (http://drupal.org/node/1321410), but whereas they seemingly worked it out with the latest dev version of token_filter, I haven´t been able to do it.
I'll appreciate a lot if you have any other suggestion, and I thank you again for your help.

merlinofchaos’s picture

a fieldable panel panel is not a node, and this may ultimately be the problem; it may understand 'current node' but not an entity such as fieldable panel panes. :( In which case, there may not be a solution that doesn't involve modifying or extending that module.

merlinofchaos’s picture

Out of curiousity, what about tokens starting with 'entity:'? (You'd need to have entity.module and its entity_token module) for that. It may still not work, but I'm not sure.

algazaras’s picture

I wasn't able to do ti with entity either, so I have decided to change route and use custom panes and mini-panels.
Thank you for your help anyway

clemens.tolboom’s picture

Status: Fixed » Active

Thanks for the pointer to token_filter.

I've created a token_filter #1321410: Improve Panels integration patch to add the node (everywhere :/).

I somehow expected %node:title tokens to be picked up too somehow.

What is better for getting the current node? This is from that patch which just tests for

      case 'page_manager_node_view_page':
        $node = $caller['args'][0];
        $data['node'] = $node;
        break;

Shouldn't token be aware of panels contexts somehow. Then probably panels token system becomes available for token_filter?

DamienMcKenna’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
Component: Documentation » Code
Category: Support request » Bug report
Issue summary: View changes

Updated the issue description to clarify the problem.