2

I want to create a module that displays nodes of a certain node type. Can this be done, and can anyone point me to a place where I can find how to do this?

1

First thing you should be looking into is module development in general. Everyone has their own way of researching such things, it could be a book such as "Pro Drupal Development" or a online video series such as http://buildamodule.com/

Are you looking to build the module for Drupal 6 / 7 etc all needs to be taken into consideration too.

To answer your question yes, I would imagine creating a block module to display certain node types be fairly easy. However you might be able to do this with views much easier... Just create a new view, filter by node type and add a block display.

  • 1
    Thank you for your response. I have ordered the book "Drupal 7 Module Development" and will check out the online video series. The Views module is only in beta for Drupal 7, so this is not an option right now. Of course, when my module is done, Views is probably out of beta a long time ago. I understand I will have to consider the possibilities. Thanks again for your response. – pusle Mar 30 '11 at 10:58
  • No worries, as @DeeZone has suggested below... even though Views is in Beta it is more than likely good to use for your desired functionality. Views is also very handy for all sorts of other tasks in administrating a website. :) If you want a really light weight site though, developing your module would be the best bet. – WestieUK Mar 30 '11 at 13:41
  • I will test Views, and I hope with heavy caching the server load will not be to intense. – pusle Mar 30 '11 at 16:40
2

There's currently 12,966 sites using the beta3 release of Views 7 (http://drupal.org/project/usage/views). I'd suggest that you install the module and try to produce what you're describing as I suspect it will work fine. A beta3 release suggests that the module is nearing a production release with no new functionality being added.

Be brave, adopt the new software rather than painting yourself in a corner by writing your own custom code.

0

This is very easy to do in views.module. Just create a view that filters by your desired node type, then create a 'Block' display type. The block will then show in the block admin page and you'll be able to place it on your site as appropriate.

  • Seems everyone is suggesting the Views module despite it being beta. I am convinced and will be testing it. Thanks :) – pusle Mar 30 '11 at 16:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.