Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. <div class="container-inner clearfix">
  2. <h1 id="page-title">
  3. <span><?php print $title ?></span>
  4. </h1>
  5. <?php $views = views_embed_view('photos', 'block'); print render($views);?>
  6. </div>
  7.  
  8. <div class="container-inner clearfix" style="background: url(<?php print $background_image; ?>)">
  9.  
  10. function my_module_or_theme_preprocess_page(&$vars) {
  11.  
  12. // $views=views_embed_view('photos', 'block');
  13. $views=views_get_view_result('photo', 'block'); // appears to work easier :)
  14. $background_image=// however you get the url/path to the image from $views;
  15.  
  16. $vars['background_image']=$background_image;
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement