Use image description from the File Library
I made a custom template where the Image Description will be visible in a div, just like the script already provides for Slide_Caption (Title). But there is a problem with it.
It should be possible since the controller.php already pulls the description from the File Library (line 56):
$image['title'] = $f->getTitle(); $image['description'] = $f->getDescription();
in view.php I changed line 44 to:
I changed to code in the file supersized.3.1.3.min.js so the description will be printed as I want. So this is not working, but it DOES work when I change the code in controller.php file, line 56, to:
$image['description'] = "Bla bla bla";
<?php $fv = $f->getApprovedVersion(); $desc = $fv->getDescription(); ?>
The docs you reference state that "For convenience, the File object will pass through any methods that it doesn't understand to its currently loaded FileVersion object." This means you can call getDescription() on the file object and because the object itself doesn't have a "getDescription" function it will pass it along to the most recent fileVersion object (and if you look at the code in concrete/models/file.php, you'll see this implemented using the "__call()" magic method).
- The images do have a description.
- This is the link to the Dojo forum:http://www.concrete5.org/marketplace/addons/dojo-supersized/forums/...
@glockops I tried it with the getApprovedVersion() code, but it doesn't work..