How do I control the output of nodes rendered inside a specific region, like the Sidebar First?

I can theme the blocks in that region by creating a block--sidebar-first.tpl.php but node--sidebar-first.tpl.php does not work.

Comments

nevets’s picture

How are you trying to theme them, what makes them different that the main content area?

Eleine’s picture

I have some theme functions that I want to use only when teasers are rendered inside a specific region.

Main content teaser tpl:
http://i.imgur.com/CFjHXqY.png

Sidebar teaser tpl:
http://i.imgur.com/4GTTjDk.png

I have already created the .tpl.php files för the nodes. I just wanna know how to make Drupal use one of them in each region.

nevets’s picture

I use display suite to achieve this. I add new view modes, configure the manage display tabs I want to use the view mode and then use views to create the block using the new view mode.

Eleine’s picture

I know the DS way. However, this time I need to do it from template files or theme functions.

If its not possible to theme nodes based on region in Drupal, i might be forced to use DS anyway. Looks like a design flaw to me, but I'm not sure.