Mlix / nextgen-gallery

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

nggShowGallery for slug #261

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I wanted to display galeries with the same name as pages, so I wanted to 
automatically display them with function nggShowGallery(). But this 
function needs gallery id and I would like to pass gallery slug. Is it 
possible? I have page slug and want to show gallery with the same slug on 
this page...

Original issue reported on code.google.com by pavele...@gmail.com on 5 Jan 2010 at 9:43

GoogleCodeExporter commented 9 years ago
Good idea... i will implement a new function

Original comment by alex.cologne on 6 Jan 2010 at 8:04

GoogleCodeExporter commented 9 years ago
+1 would love to display gallery using slug.
thanks

Original comment by eraldmar...@gmail.com on 20 Mar 2011 at 7:36

GoogleCodeExporter commented 9 years ago
I think this one is pretty easy to implement. It seems that the applied patch 
lets us get the gallery by gallery slug.

Before $albumID was compared to 0 which was true if the $albumID was a string. 
I have changed it to also check if it is a number. Otherwise it will leave it 
as is. The nggdb::find_album does support finding galleries by slug already.

The tests show that the short code [album id="test-album" template="extend"] 
gives me the gallery called test-album. You still can't change the album slugs, 
but I guess that is next step.

Original comment by kristian...@gmail.com on 6 Feb 2012 at 7:02

Attachments: