Hello,

Views carousel is a helpful module but when my view-fields (image) are empty - the design from carousel will shown anyway in my site.

I use the view-block in my User-Profiles with arguments - any user upload picture - any users upload not picture. By users with no pictures - the "Views-carousel-Design" with the left/right arrows and so on will show anyway in the Profile although no picture in carousel available.

Anyone an idea how can i fix this?

Comments

drewish’s picture

Seems like you could modify the template to check $rows first:

<div class="item-list viewscarousel clear-block">
  <?php if ($rows): ?>
    <ul id="<?php print $viewscarousel_id ?>" class="<?php print $viewscarousel_class ?>">
      <?php foreach ($rows as $row): ?>
        <li><?php print $row ?></li>
      <?php endforeach; ?>
    </ul>
  <?php endif; ?>
</div>
mfer’s picture

Status: Active » Postponed (maintainer needs more info)

I cannot replicate this. When I have no returned results it doesn't generate anything. Can you provide more details?

Berliner-dupe’s picture

Hi,

an other alternative is.

Work with views + relationship + Filter

In "relationship" use ("my_field" -> fid) (your field from Views carousel) and then you use a new filter .... the filter call "file->file-ID" - make it "Operator: Is not empty - NOT NULL) over this field set the relationship-field - choose there your field "my-Field" ....

Now the Views carousel will show only when real pictures/content is available .

Sorry for my bad english - i hope you understand this.

Regards Matthias

drupalmouse82’s picture

Title: Don't show "Views carousel design" when Views-fields is empty? » thanks berliner

thanks! it works! my english is bad too!! ( i am from argentina) but i understand you very well! i'm working with drupal 7!!

regards Adrián