So I'm tearing out my eyes for a solution here. I have a view,and all I want to do for the image content is to use two different formatters effects. Example I want to use Adaptive Image formatter and Lightbox2 formatter. I started tinkering with custom formatter html+token but I guess I'm not that advance to figure out how to combine html + token variable to create a custom formatter of two formatter effects.

Are there any examples of combing two formatter effects to create a Custom Formatter?


Custom Formatters module is a (another) good way for this, you can check more samples in official website at: http://customformatters.com.

You probably need to use PHP code for this and get all advantages of powerful Drupal API, tokens are limited uses for simple outputs without rewrite.

Example for render image fields (do NOT include ):

$output = '';
foreach ($variables['#items'] as $item) {
    $output .= theme('file_link', array('file' => (object) $item)); 
return $output;
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.