colorbox view mode

+1
0
-1

How can we change the view mode for colorbox on front page? Displaying full node in a colorbox is not suitable for our needs. We want to display teaser mode?

Thank you.

+1
-1
-1

ı have write a custom module for front page modal boxes with the following hook.

function mymodule_entity_view_mode_alter(&$view_mode, $context) {
// Change the view mode to teaser for anonymous users viewing a node.
if ($context['entity_type'] == 'node' ) { //also make sure that Get variable iframe is set..
$view_mode = 'popup';
}
}

+1
-5
-1

TB Wall theme only supports to display a full node in a colorbox. If you want to display content in other modes, you have to write extra code to achieve it. Moreover, you should also take a look at 3rd-party module Colorbox Node. This module provide an extra mode for Colorbox.

+1
+5
-1

In fact, view mode modal is the exact module we need but it breaks the theme front page css rules in terms of hovering the budges.

Where should we start to write extra code in order to achieve this ? Which template file the color box links are generated and which files support this full node view to colorbox?

Thanks is advance.