I have trouble printing views block, in drupal 7 i have print using this

<?php $portNode = module_invoke('views', 'block_view', 'works-node'); ?>

<?php print render($portNode['content']); ?>

 

I have tried on Backdrop and its not functioning Please Help

Comments

drop's picture

I think the function you are looking for is views_embed_view(). This is the preferred function to embed the output of a view - both in Drupal 7 and Backdrop CMS!  Check out the API documentation for more info.