I've been trying to make sense of Tamper module and associated plugins and can't get it to do several (seemingly) simple tasks:
- Rewriting a target to combine the values of several sources.
- Reuse a source in more than one target field and format each differently.
It seems like one would want to create one tamper for each target (rather than source) since defining content and format of the output is our ultimate objective. Is it possible to assign tamper output to a particular node field not identified with a source? It seems not.
Since we can only define utilize target fields by assigning a source to it in the mapping, it would seem we're forced to reuse source fields or include fake (blank) ones. But then the tamper rules are grouped according to source, regardless of whether that source is destined for different targets. So consequently one can not re-format the source data for different, distinct purposes in the target fields.
Please tell me I've missed something basic...
Comments
Comment #0.0
Lynnwood CreditAttribution: Lynnwood commentedminor edits
Comment #1
Lynnwood CreditAttribution: Lynnwood commentedReporting back that I have figured out ways to accomplish what I outlined above. Here's a few notes on what I did that may be helpful to others:
While it seems to me that the Tamper module could be designed to make this kind of use-case easier and more intuitive, I did figure out how to do it so I'll close this issue.
Comment #1.0
Lynnwood CreditAttribution: Lynnwood commentedanother correction.
Comment #2
liquidcms CreditAttribution: liquidcms commentednot completely sure this is correct. isn't it, sadly, the other way around?
at least the PHP plugin is opposite to this. if you reformat a source and then also have a php formatter on a different source but that uses that original source; only the reformatted source (i.e. the target) is available. the original source is no longer available to use as a token.
i think the copy source could be used to compensate for this; but as yet i have not figured it out.
and yes, i agree, the logic for some of how this works seems backwards and therefore much more confusing that it should be.
Comment #3
gaele CreditAttribution: gaele commentedhttps://www.drupal.org/node/2614786