Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently to alter any of the previews a developer would have to do so in hook_page_alter ideally we would have a theme function, however, with time constraints I think it would be acceptable to use a simple alter so that users could adjust the elements that display here. For instance when the original image is insanely larger someone could link to the original instead of showing it in all its pixelated glory on the preview page.
I will be posting a patch shortly.
Thanks,
Jonathan
Comment | File | Size | Author |
---|---|---|---|
#6 | focal_point-2350139-6-add_alter_for_focal_point_preview.patch | 335 bytes | awakash |
#1 | focal_point-2350139-1-add_alter_for_focal_point_preview.patch | 335 bytes | grndlvl |
Comments
Comment #1
grndlvl CreditAttribution: grndlvl commentedComment #2
grndlvl CreditAttribution: grndlvl commentedComment #3
bleen CreditAttribution: bleen commentedI think this should really be a theme function ... if for some reason it *must* be an alter, than it needs an entry in focal_point.api.php
Comment #4
awakash CreditAttribution: awakash commentedIgnore
Comment #5
awakash CreditAttribution: awakash commentedComment #6
awakash CreditAttribution: awakash commentedSince focal point is up to 7.x-1.0, I've updated this patch accordingly.
Comment #7
bleen CreditAttribution: bleen at NBCUniversal commented@awakash - is there any reason why this *must* be an alter (as opposed to a theme function)?
Comment #8
grndlvl CreditAttribution: grndlvl at GollyGood Software for Advomatic commentedNo it's not a must. it was simply the convenience at the time of implementation.
I agree it would be better to add a theme function for _focal_point_preview() for building the output instead of using the generic build array.