So i have made a view and a block for a carousel. I want to call this view or block in my template. (panels-pane.tpl.php).
I have tried to call the view with this function :
<?php $view = views_embed_view('carousel', 'carousel-block_1'); print $view; ?>
Unfortunately this is not working. Variable $view is NULL
I also tried to call a block in this template file with this function :
$block = module_invoke('views', 'block_view', 'carousel-block_1');
var_dump($block); // Empty ;s
Also not working..
The Delta ID is right. See Screenshot below for more information.
Do i something wrong?
Full page code with other view render (also not working):
<?php
// @codingStandardsIgnoreFile
/**
* @file panels-pane.tpl.php
*/
?>
<?php if ($pane_prefix): ?>
<?php print $pane_prefix; ?>
<?php endif; ?>
<div
class="<?php print $classes; ?>" <?php print $id; ?> <?php print $attributes; ?>>
<?php if ($admin_links): ?>
<?php print $admin_links; ?>
<?php endif; ?>
<div class="pane-content">
<?php $view = views_embed_view('downloads', 'downloads-product_downloads'); print $view; var_dump($view); ?>
<?php print render($title_prefix); ?>
<?php if ($title): ?>
<<?php print $title_heading; ?><?php print $title_attributes; ?>>
<?php print $title; ?>
</<?php print $title_heading; ?>>
<?php endif; ?>
<?php print render($title_suffix); ?>
<?php if ($feeds): ?>
<div class="feed">
<?php print $feeds; ?>
</div>
<?php endif; ?>
<?php print render($content); ?>
</div>
<?php if ($links): ?>
<div class="links">
<?php print $links; ?>
</div>
<?php endif; ?>
<?php if ($more): ?>
<div class="more-link">
<?php print $more; ?>
</div>
<?php endif; ?>
</div>
<?php if ($pane_suffix): ?>
<?php print $pane_suffix; ?>
<?php endif; ?>