开发者

How to embed a node on homepage in Drupal 6?

How can I embed a node on the front page in Drupal 6. The node basically has the image upload field along with title and description. I want it to some how appear on the homepage alongwith a "views" which shows the uploaded images at the bottom.

What I want is to give the users an ability to create content which is right now available at .../node/photo/add. I want开发者_如何学Go to somehow show this box which lets one create content i.e. upload photo with title and description on the homepage.

It's basically just an attempt at creating something like imageshack as an experiment.

I am pretty n00b when it comes to drupal so please be more descriptive.


Jukebox's solution works as a point-and-click method. If you want to do it with code, it's more like this:

  • create a glue module Handbook | Example Blog Post
  • turn it on in admin/build/modules
  • create a menu item using hook_menu() that will become the page
  • embed the node with node_view()
  • embed the view (blog post)
  • in admin/settings/site-information set your page to the


You can use the Node Blocks module to, well, turn your node into a block. This means that you can go to the /admin/build/block page and place your node in a particular region.

After installing the module, edit the Content Type of the node you want to turn into a block. Under Workflow Settings, Available As Block, choose Enable.

Now you can go to /admin/build/block and you can see some new blocks. Just choose the one you want and place it in the region of your choice. You can also configure that block's visibility settings from there as well.


If your planning on having a more complicated home page at any point in the future I'd highly recommend using Panels to do this. It will allow you to arrange your front page with views and nodes in a grid method.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜