I have found code to allow me to insert a block into a page: <?php $block = module_invoke('tagadelic', 'block', 'view', 6); print $block['content']; ?> But I have a block I made in views which I don't know the number of. When I hover over Configur in the block admin, I just see this: http://www.mysite.com/admin/build/block/configure/views/LatestVideosBlock How would I insert this into another node? (Before anyone mentions it, I don't want to use another module) thanks Neil
You can embed your view: <?php $view = views_get_view('LatestVideosBlock'); print views_build_view('block', $view, array(), false, false); ?> Hans www.koba.be 2008/7/1 Neil: esl-lounge.com <neil@esl-lounge.com>:
I have found code to allow me to insert a block into a page:
<?php $block = module_invoke('tagadelic', 'block', 'view', 6); print $block['content']; ?>
But I have a block I made in views which I don't know the number of. When I hover over Configur in the block admin, I just see this:
http://www.mysite.com/admin/build/block/configure/views/LatestVideosBlock
How would I insert this into another node? (Before anyone mentions it, I don't want to use another module)
thanks
Neil
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Hans Rossel KOBA Webdevelopment Kerkstraat 228 9050 Gent 09-334.52.60 0472-79.32.16 www.koba.be info@koba.be
Hans That seems to have ALMOST worked. The original block has 5 nodes per block/page whereas when I inserted it into the page, I got every single one showing....64 video nodes running down the page. Any idea why that would be? Neil ----- Original Message ----- From: KOBA | Hans Rossel To: support@drupal.org Sent: Tuesday, July 01, 2008 12:54 PM Subject: Re: [support] Inserting block into a page. You can embed your view: <?php $view = views_get_view('LatestVideosBlock'); print views_build_view('block', $view, array(), false, false); ?> Hans www.koba.be 2008/7/1 Neil: esl-lounge.com <neil@esl-lounge.com>: I have found code to allow me to insert a block into a page: <?php $block = module_invoke('tagadelic', 'block', 'view', 6); print $block['content']; ?> But I have a block I made in views which I don't know the number of. When I hover over Configur in the block admin, I just see this: http://www.mysite.com/admin/build/block/configure/views/LatestVideosBlock How would I insert this into another node? (Before anyone mentions it, I don't want to use another module) thanks Neil -- [ Drupal support list | http://lists.drupal.org/ ] -- Hans Rossel KOBA Webdevelopment Kerkstraat 228 9050 Gent 09-334.52.60 0472-79.32.16 www.koba.be info@koba.be ------------------------------------------------------------------------------ -- [ Drupal support list | http://lists.drupal.org/ ]
The last variable in the array is the numbers to be displayed. Just put it on 5 if you want to have 5 nodes. <?php $view = views_get_view('LatestVideosBlock'); print views_build_view('block', $view, array(), false, 5); ?> Hans www.koba.be 2008/7/1 Neil: esl-lounge.com <neil@esl-lounge.com>:
Hans
That seems to have ALMOST worked. The original block has 5 nodes per block/page whereas when I inserted it into the page, I got every single one showing....64 video nodes running down the page. Any idea why that would be?
Neil
participants (2)
-
KOBA | Hans Rossel -
Neil: esl-lounge.com