Jump to content

Image Thumbnail Module - Images not displaying


NooseLadder
 Share

Recommended Posts

Hi,

I've installed PW. Installed the image thumbnail module. Installed template and created a page.

Here is the page: http://www.digsuk.co...sswire/gallery/

I have uploaded 1 image to the page but it is not displaying, only the image file name is showing gallery_1.jpg on the page.

I have put this in the template file: <?php echo $page->image_uploader; ?>

image_uploader is the name of the field I created with type CropImage.

I suspect I've missed something in the template code. Please help.

Link to comment
Share on other sites

To get url of an image:

echo $page->image_uploader->url;

And from the thumbnail doc:

echo $page->image_uploader->eq(0)->getThumb('thumbnail')

If single image field

echo $page->image_uploader->getThumb('thumbnail')
  • Like 1
Link to comment
Share on other sites

I want to achieve a similar layout to the portfolio page in Marty's video.

I want the website owner to be able to upload images that are automatically added to the thumbnails and the main image display, but without the need to add lines of code to the template page.

This is what I am missing here.

Link to comment
Share on other sites

Is it this one? http://illo.clientsite.net.au

If so then each image is a page under 'portfolio'.

Image%202012.08.01%2011:05:59%20PM.png

The part that drives the thumbnails and the main image looks like this:

<ul class="thumbs">
 <?
 foreach($pages->get("/portfolio/")->find("template=work-item, sort=sort") as $p)
 {
if ($page->parents->has($p) || $p === $page) {
	$class = ' class="current"';
} else {
	$class = '';
}
  echo "<li$class><a href='{$p->url}'><img src='{$p->image->eq(0)->getThumb('thumbnail')}' title='{$p->title}' alt='{$p->title}' width='61' height='61' /></a></li>";
 }
 ?>
</ul>
<img src='<?="{$page->image->eq(0)->size(0,373)->url}"; ?>' alt="title" />

Regards

Marty

  • Like 2
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

  • Recently Browsing   0 members

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