Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By dewolfe001 on
Drupal Newbie question:
I'm experimenting with Drupal on a new site (http://www.game-boyz.com/drupal-4.7.2/ ) trying to show off a segment from menu (the Platforms). I have that built as a menu item that I've added to the left side bar block). I would rather add this menu item elsewhere on the page.
I tried this code:
<?php
$block = module_invoke('menu', 'list', 'view', 104);
$output = "<div class=\"front-page-block\">\n";
$output .= "<div id=\"front-block-title\"><h2>".$block['subject']."</h2></div>\n";
$output .= "<div class=\"content\">".$block['content']."</div>\n";
$output .= "</div>\n";
print $output;
?>
That doesn't work. What is the right syntax for adding a menu a spot on the theme?
Thanks in advance,
All the best,
Mike
Comments
Regions should do the trick
You can define regions in your theme (see http://drupal.org/node/29139) and assign blocks to the region of your choice. When you define a new menu (using the menu module) it allows creates a new block to display that menu. So with regions you can then assign the block for the menu to the region that you wish.
about placing the content of block on page
hi friend
i tried the insert_block module provided by drupal
it is working fine
With this I can place any block on anywhere on page
I tried with user login poll latest image and also user created blocks
No problem at all, try it else mail me at abhik63@gmail.com
Abhijeeet G. Kinjawadekar