samtiria / nextgen-gallery

Automatically exported from code.google.com/p/nextgen-gallery
0 stars 0 forks source link

Templates don't distinguish between sub-albums und sub-galleries #466

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
From the template point of view, sub-albums and sub-galleries are the same. If 
you have to know what you are dealing with you have to look at the ID (the key 
of $galleries in an album-template). If it is prefixed with an "a", then you 
have an album.

In the template, you must use code like this:
foreach ($galleries as $key => $gallery) {
  if (substr( $key, 0, 1) == 'a') { 
    $isAlbum = true;
  }
... some template stuff happens here ...
}

It might be easier preset some field in nggCreateAlbum() like 
$galleries[$key]->isAlbum to true/false and then use this in the template. What 
do you think about this?

Original issue reported on code.google.com by prollius@gmail.com on 1 Feb 2012 at 5:39