I'm using Drupal 4.7. Gallery 2 is embedded perfectly.
On my home page, I'm utilzing GalleryEmbed to pull some random images from random albums. I'm seeking to be able to all access the two custom fields each album contains. Have searched and searched for direction on this to no avail.
I'm assuming I work with CustomFieldHelper.class somehow, but am looking for insight.
Thanks.
_PTG
Posts: 32509
too bad the existing customfield interface (modules/customfield/classes) doesn't include the function fetchFieldValues() which is defined in the helper.
why? because accessing an internal helper is error-prone when you upgrade galery since there's no guarantee that the helper won't be moved / deleted / ...
2 options:
1. see function getImageBlock() from modules/core/classes/GalleryEmbed.class and code the same for the customfield (fetching the block template).
this new function can be in your own code, doesn't have to be in GalleryEmbed.
2. add fetchFieldValues() to the customfield interface and then use
of course you could access the helper directly, but:
- you'd first have to check if the customfield module is active
- the helper class is not guaranteed to be there.
you can file a feature request to include a getter / fetch method to the customfields interface.
Posts: 2
Valiant -
If I were using the 'Description' field, would it make this easier? Your instructions are a bit over my head.