Jump to content

Blue-VR ProcessWire Site Profile


Recommended Posts

I would like to display a random Image in the Hero Background.  I have replaced the code on Line #3 in the  ./views/home.inc

<?php echo $page->hero_unit->image->url?>

with

<?php			if(count($page->hero_unit->images)) {
				$image = $page->hero_unit->images->getRandom();
 	     		echo $image->url;	
}
?>

and it returns a blank hero bg.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...