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

Shai Gluskin shai at content2zero.com
Mon Mar 1 16:27:51 UTC 2010


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 --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20100301/9834f7e4/attachment-0001.html 


More information about the support mailing list