Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.5
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
5 May 2009 at 05:47 UTC
Updated:
20 May 2009 at 21:00 UTC
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
Comment #1
subir_ghoshWell, 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?
Comment #2
subir_ghoshI have found why the node_images don't show up. It's because in the FILTER, Node_Images = Hase Images does not show up.
Comment #3
merlinofchaos commentedSo I guess this is fixed?
Comment #4
subir_ghoshNot 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?
Comment #5
merlinofchaos commentedThat would be an issue against whichever module provides that filter. I guess image.module?
Comment #6
subir_ghoshNo, 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 :)