1

I am using the jCarousel Views module; I want to hide the view when the number of items are not greater than 3. How do I do it?

1 Answer 1

1

You can use JCarousel views as block display and then set a visibility condition by executing custom php condition test code (This will require to enable PHP Filter module)

$result = views_get_view_result('view-name', 'display_id');

Then you can analyze the $result and count the number of results. Most probably you need to do ....

if(count($result)<3)
    return FALSE; //Would not let to show that block
else
    return TRUE; // Would let to show

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.