Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

Drupal - Loading a views block inside another block

You can achieve it by following snippet in your block,

  Some random text here...
  echo views_embed_view('view-name', $display_id = 'display-name');
  Some random text here...

eg:

 <?php echo views_embed_view('test', $display_id = 'block'); ?> //dont forgot to enable text format as PHP.

Tags:

Views

Theming

7

Blocks

Related

Drupal - How to use node title or path alias instead of node id in node reference contextual filter in views? Drupal - How to fix 'Call to undefined function node_load() in menu.inc' fatal PHP error? Drupal - How to get nodes by custom field value using EntityFieldQuery? Drupal - Must new tables be created in hook_update_N()? Drupal - How can I upload 1000s of nodes per hour to a live drupal 7 site and avoid deadlocks? Drupal - When should "'target' => 'slave'" be used in a query? Drupal - How can I quickly re-save all the nodes on my site (to trigger a rule that activates on content update)? Drupal - Get the latitude and longitude from the user ip Drupal - How can I detect if the current viewed page is administrative? Drupal - Remove subject field from comments Drupal - The PHP version is not correctly detected Drupal - Character limit of field machine name?

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy