Jump to content

getting random images


Recommended Posts


i'm trying to have a random image render for each item of my posts list.

so i found this

			$items = $pages->find("template=project, Year=$page");
				foreach ($items as $item){
											echo "<li>
													<div class='item-inner'>
														<img src='$item->images->first()->url' width=150px alt='Too Bad'>
															<div class='overlay'>
																<a href='$item->url'><h5>$item->title</h5></a>

										} ?>

but i don't understand why it renders me


I'm sorry to bother but i can't figure out what i'm doing wrong.

thanks for your help

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...