Page 1 of 1

Gallery: create new gallery from UDT

Posted: Tue Jul 07, 2015 9:38 am
by Cerulean
I'd like to learn a good way to create a new gallery in the Gallery module from a UDT. Auto-generating galleries for pages/news items/listit2 items is something I find myself needing to do regularly (and I wish Gallery had closer integration with pages/news/etc but that's a topic for another day).

In the past I've done this by simply using the PHP mkdir function to create a new directory in the "uploads/images/Gallery" folder. This works okay, but it's not ideal because no corresponding database entry is made for the directory until the directory is browsed in the Gallery admin.

Does the gallery module have a function/method that I can use to create a gallery from a UDT?