4images Forum & Community

General / Allgemeines => Programming => Topic started by: Sun Zaza on January 16, 2010, 09:52:21 PM

Title: category name and then the images in a list
Post by: Sun Zaza on January 16, 2010, 09:52:21 PM
Hello,

On my gallery I have 2 categrories:
category 1 (id=1)
category 2 (id=2)

In each category I have 5 images.

Now I want to have a list with all images on my gallery like this:

category 1
1 image_name
2 image_name
3 image_name
4 image_name
5 image_name
category 2
6 image_name
7 image_name
8 image_name
9 image_name
10 image_name


That means the name of category and then the images of this category and then the other category and then the images of the last category.

The basic code is:

$video_list .= "<tr><td valign=\"top\" class=\"sortable\">".$i++."- <a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$image_row['image_id'])."\">".$image_row['image_name']."</a></td> 
   
</td></tr>
   ";                   
}     
}
  $video_list .= "</table>\n";
 
$site_template->register_vars("video_list", $video_list);
unset($video_list);

Thanks in advance,
Cruxy
Title: Re: category name and then the images in a list
Post by: Sun Zaza on January 19, 2010, 11:46:17 AM
Any hint, tip or something help me please?

I really need that.
Title: Re: category name and then the images in a list
Post by: jimmmarks on January 27, 2010, 04:19:12 AM
Thanks a lot. It's very useful.