hello,

i'm trying to figure out an efficient way to display nodes of certain content type, as icons on my front page. for instance, all nodes of type 'news' will be displayed in a grid, each node having a different icon image (fixed size) which will be loaded from an external source.

i was able to do a similar thing in Wordpress: http://iradlee.net/
though i couldn't yet find the way to repeat the technique in Drupal.

will appreciate any pointers or suggestions.

thanks!

Comments

ziobudda’s picture

Use "views". Create a block and create your .tpl.php's views file for the rendering; in Drupal 6 exists the "grid" output. You can find the name of this .tpl.php file in the views create/edit page when click on the link "Theme: Information" in the "Basic settings" column. In the block admin section (admin/build/block) link this block to the "content" region.

for the image in the views' .tpl.php file you can do one thing like this:


switch($node->type) {
  case 'news' : echo "<img src='pippo.jpg'>";
                       break;

  .......


I think that this is a good starting point. And sorry for my bad english.

M.

Freelancer Senior Drupal Developer -- http://www.ziobuddalabs.it

Kampana’s picture

hey, thanks for your reply.
i've been trying to follow the steps you've mentioned, but it doesn't work so far.
also, it seems that Grid output is only available when using the Views bonus pack, which is incompatible with Drupal 6. true?

Kampana’s picture

got it.

ziobudda’s picture

No, grid is compatible with D6.

Freelancer Senior Drupal Developer -- http://www.ziobuddalabs.it