[support] Blocks and views or coding in page-front.tpl.php

Ole Kerpel oke at iisg.nl
Tue Mar 2 13:39:26 UTC 2010


Shai, 
 
thanks for the great reply. I had the Views part done already but now I need to place it on the right spot. Thanks for the link you sent me. I am sure I will succeed sooner rather than later.
 
Thanks again!
 
Kerpel
 
Ole Kerpel
Developer

Internationaal Instituut voor Sociale Geschiedenis
Postbus 2169
1000 CD Amsterdam
T: 0208500137
E: oke at iisg.nl
www.iisg.nl

________________________________

From: support-bounces at drupal.org on behalf of Shai Gluskin
Sent: Mon 3/1/2010 5:27 PM
To: support at drupal.org
Subject: Re: [support] Blocks and views or coding in page-front.tpl.php


Ole, 


*	Row style: fields 
*	Style: Unfomatted 
*	Fields: Sounds like you just want "Node Title" (with the option, "link to node" checked on). 
*	Display: click on the dropdown and select "block" and then click "add display." 


I always use Views for this kind of stuff... so much more maintainable than coding directly on your template.

Don't give up on Views. It's awesome! Definitely takes some getting used to, because it is so powerful and flexible.

As for placing the view in page-front.tpl.php ...

If your theme had separate regions for that spot like for example Litejazz or Acquia Marina, then you could use Drupal's block administration to put the views in the right spots. But it sounds like your theme might not, which is cool, not a problem.

Check out instructions here for how to directly invoke the placement of a block into your template:

http://drupal.org/node/345361#comment-2587878

Shai

	Hi all,

	 

	 

	I have a HTML design and I am transferring it into Drupal templates. There is a table with four cells on the homepage (and on the homepage only). In each cell there are a maximum of three titles of the most recent items. Each of the four cells represent a different contenttype.

	 

	I created a block with the right content for the first cell, but I got stuck constructing the table and its content with templates. More specific, I got stuck on understanding the "display", "row", "style" and "field" parts of the view section.

	 

	Because it took me too long I ended up writing php code in the page-front.tpl.php file.

	 

	Would anyone of you suggest to go and use blocks the way I first tried it and if so - how?

	 

	 

	Thanks in advance for the trouble taken,

	 

	Kerpel


	--
	[ Drupal support list | http://lists.drupal.org/ ]
	


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 6611 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/support/attachments/20100302/3a8c2e05/attachment.bin 


More information about the support mailing list