-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not finding images on portfolio block #4
Comments
You need to add some code to your block controller that tells the export that the screenshot field is an exportable image field. This will cause the file ID to be replaced by a placeholder to the image in question ({ccm:export:image:image_filename.jpg}) which will then list the image in the export list, and make it so that it'll be properly replaced when it comes time to import the content. This can usually done by simply adding the field to an array you define in your block controller named $btExportFileColumns. For example, the image block controller has this:
I think adding this to your block controller would do the trick:
|
Wonderful! Works like a charm. Is this the only type of thing that needs to be defined in the controller or are there other elements that need the same treatment? |
Sorry to keep posting stuff here but I can't install the 5.7 side of this thing until I can get my hands on version 5.7.4a1. I have no time to set up a fully-working, development stack for 5.7 so do I have to wait for you folks to release this version? |
Probably. It shouldn't be long. We have a number of fairly important issues we've noticed from 5.7.5.3 that we're hammering out and we'll do another release. |
I have a custom 'portfolio' block that has a 'screenshot' image grabbed by the File Manager through the helper and saved as a fID in the block's db table. The exported XML properly inserts the fID in a tag called < screenshot >345</ screenshot > but the export function reports no image files on the page to be downloaded separately. At first I thought it might have been that I was assigning the image in the CSS as 'background-image' but I am not. The view.php creates an < img > tag.
The text was updated successfully, but these errors were encountered: