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


Add new comment