In D5.17 + Views1.6 I was using the following in the node-nodetype.tpl.php template to theme multiple views:

<?php if ($page == 0): ?>
<?php global $current_view; ?>
<?php if ($current_view->name == 'viewname1') { ?>
      DISPLAY STUFF
<?php } elseif ($current_view->name == 'viewname2') {; ?>
      DISPLAY STUFF
<?php } elseif ($current_view->name == 'viewname3') {; ?>
      DISPLAY STUFF
<?php } elseif ($current_view->name == 'viewname4') {; ?>
      DISPLAY STUFF
<?php } else {; ?>
      DISPLAY STUFF
<?php }; ?>
<?php endif; ?>
<?php if ($page == 1): ?>
      DISPLAY STUFF
<?php endif; ?>

It worked perfectly.

However, it does not work with D 6.11 + Views 2.5. What should I be changing here?

Comments

subir_ghosh’s picture

Well, I have fixed the issue by replacing

<?php global $current_view; ?>

with

<?php $current_view = views_get_current_view(); ?>

But what is happening now is that in the blocks (generated by the respective views), the images are being stripped away. In all these I am using node_images. Views somehow seems to be stripping away the IMG tags in the blocks. Would this be a Views issue or a Node_images issue from hereonwards?

subir_ghosh’s picture

I have found why the node_images don't show up. It's because in the FILTER, Node_Images = Hase Images does not show up.

merlinofchaos’s picture

Status: Active » Fixed

So I guess this is fixed?

subir_ghosh’s picture

Not really, Merlin. It has resulted in a different issue: in the FILTER, Node_Images = 'Has Images' does not show up. Should I continue on this thread itself, or does it merit a new Issue?

merlinofchaos’s picture

That would be an issue against whichever module provides that filter. I guess image.module?

subir_ghosh’s picture

No, Merlin. It wouldn't be Images module since I don't use it. Must be node_images.module. I guess i will take it up with them :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.