I'm working on a site that uses DS with Panel nodes, and per client request, I need to figure out a way to assign an image style to an image on a per node basis. My first thought was to create a select list field in the content type that lists the available image styles, and then in the node preprocess function, get that value, theme the image using theme('image_style'), put that into a variable, and use that variable. The problem is, the image is part of the $left variable in the DS template, because it is in the left region in the layout. There is no $left variable available in the preprocess function, however, and it looks like it get's rendered between the preprocess function and the template.

So with all that, my question is this: where can I access the image before the image style defined in the Manage Display settings for the content type to set the image style?

Thanks.

Comments

aspilicious’s picture

Status: Active » Closed (fixed)

This is not a display suite issue. ANd I have no clue how to fix it. Please use drupal.stackexchange.com for general coding questions.