Q - re: [l:http://uk.youtube.com/watch?v=QJFAphE4MPc|Drupal frontpage squares tutorial ] this is indeed a very nice and inspiring demo ....but it would be great if you could let us know how you made the image node appear as a background in the featured block.( i don't mean the taxonomy part ) ?
A - Imagecache and views with the following code in pagefront-tpl.php. ...

I sliced the pic into two halves and used one piece in each of the squares

<div id="bottom">
<div id="bottomleft">
<?php
$view_name
= 'bottomleft'; //name of view
$limit = 4; // number of returns
$view_args = array();
$view = views_get_view($view_name);
print
views_build_view('page', $view, $view_args, FALSE, $limit);
?>

</div>
<div id="bottomcenter">
<?php
$view_name
= 'picleft'; //name of view
$limit = 1; // number of returns
$view_args = array();
$view = views_get_view($view_name);
print
views_build_view('embed', $view, $view_args, FALSE, $limit);
?>

             <div id="bottomrighttext">
<?php
$view_name
= 'picrighttext'; //name of view
$limit = 1; // number of returns
$view_args = array();
$view = views_get_view($view_name);
print
views_build_view('page', $view, $view_args, FALSE, $limit);
?>

</div>
</div>
<div id="bottomright">
<?php
$view_name
= 'picright'; //name of view
$limit = 1; // number of returns
$view_args = array();
$view = views_get_view($view_name);
print
views_build_view('embed', $view, $view_args, FALSE, $limit);
?>

</div>

I am now selling the complete theme and empty website database for [l|http://venturacottage.com/frontpage-squares-theme|$60, including an hour of my time] to help set up. If this is of interest please let me know.
Regards
Joe

Tags: 

Add new comment

Filtered HTML

  • To post pieces of code, surround them with <code>...</code> tags. For PHP code, you can use <?php ... ?>, which will also colour it based on syntax.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Strips broken/unpublished internal links from output.
  • Adds node titles to internal links found in content (as HTML "title" attribute).
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.