create custom template for lightbox2 I have created an override template for the poll content type called "page--type--poll.tpl.php" using a preprocess hook, but now I need to create extra effect on this template so that when people click on the title from the front page the node will show in a lightbox.
I got the lightbox effect to work, but it still shows the whole node, How I can tell drupal that this content type has two templates and that the difference is which link they clicked from the view.
The way I've handled this is by adding a extra $_GET parameter to the end of the lightbox link url-s. For example if the url is http://www.example.com/somepage then you could turn it into http://www.example.com/somepage?lightbox=true. This can be done via javascript if it's troublesome modifying the view - might even be more suitable so that users with javascript turned off will get a better template. Then you can tell Drupal to use a different template for lightbox content this way:

function mytheme_preprocess_page(&amp;$variables) {
  if (isset($_GET['lightbox']) &amp;&amp; $_GET['lightbox'] == TRUE) {
    $variables['theme_hook_suggestions'][] = 'page__lightbox'; // page--lightbox.tpl.php
  }
}