Hi,
I'm trying to use Catalog module as a flash gallery. So I need to generate(update) xml file every time I add a new photo.
But I don't know where to hook the function to save files.
Any suggestions? Thank you for your help
Hi,
I'm trying to use Catalog module as a flash gallery. So I need to generate(update) xml file every time I add a new photo.
But I don't know where to hook the function to save files.
Any suggestions? Thank you for your help
Well the catalog has it's own XML output with RSS feeds, but that may not be the correct format. You can re-format that to create the necessary XML for your requirements. If you're trying to attach the XML to a field, then it's as simple as just adding it to a save_callback in the DCA. You can look at the config file to see how to do that. It's similar to the standard save_callback for Contao, so that's not anything directly to do with the Catalog then.
It's too difficult for me. Which file, in DCA folder, should I edit. I would like to add a method "save_callback" to the field file.
I need a separate xml file for each gallery.
You'll have to add an extension to the catalog to make it have a savecallback. Since the Catalog's DCA is virtual, you cannot directly attach that. You'll have to make a new field type that is a copy of the image_gallery type, add it's palette and make THAT have a save_callback...
Why not just use the DFGallery flash file and use that template to see how the XML was auto-created int the template from the gallery input (CE_dfGallery).
Maybe you should use a ready flash gallery.. Lots of them are distributed for free..for example this one flash photo gallery
Bookmarks