Excuse my inexperience if this is a basic concept...

I've got the image module working - I would like to have the first (or maybe the first two?) images in the gallery show in my page.tpl.php template - either by using some php snippet in my page.tpl.php file - or by turning on a block and i can use the php code for 'right_block' to stick in my template layout..

Does that make sense? is this possible?

Comments

ben8jam’s picture

Title: Can i use this as a module? » Php Snippet?

nobody?

i've been messing with the php, unfortunatly i don't know enough to really make it work... i found that by putting this into the page.tpl.php it returns the image gallery info, but i don't know how to edit it.. and strangely enough it also puts the "next" buttons for the main front page content below it - but doesnt' do that on the /image page-

unset ($output);
$output=image_gallery_page_custom($type = NULL, $tid = 0);
print $output;

all i need is some code that displays the first image from a gallery..... please?

manal’s picture

Why dont u use views module, create a block that returns the number of images u want, from the gallery/ies u want and then configure the block to be displayed in your homepage, it will be very straight forward.

drewish’s picture

Status: Active » Fixed

manal is correct, views would be the best way to do this.

ben8jam’s picture

okay - i went ahead and did that ... thanks!

however, it shows the full size image - is there any way to show the thumbnail?

ben8jam’s picture

nevermind - found out how to do that

gurukripa’s picture

ben..cld u mention how u managed the thumbnail..cld help us too..

i want to have a view of all user pics..so wld be nice to have thumbnails of people who wrote a blog for example.

thanks

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.