The way you suggest is better because it automatically generates the preview image and links to the doc. I'll put it on my list to try it in the future.
I figured it out! Had to do some fiddling with css to make it work but it looks fine now. In my theme, there was link styling like this:
a {
padding: 5px 0;
display: inline-block;
}So I added...
Separately, I had built a site for a friend some years ago using D8 but she found it too difficult to use and so it never gets updated. I was thinking of converting it over to Backdrop, hence my post...
@keiserjb - Thanks for your suggestion. You say:
it is a solution for a field, not really adding pdfs to a body field.
So this also is for a file field, though taking a little different approach,...
Almost there:
see https://docs.backdropcms.org/api/backdrop/core%21includes%21file.inc/fun...
// Delete the file.
file_delete($file_fid);
rather than:
// Delete the file.
file_delete(...
Posted1 day 12 hours ago by Martin Price | System Horizons Ltd (yorkshirepudding) on:
Recent comments
The way you suggest is better because it automatically generates the preview image and links to the doc. I'll put it on my list to try it in the future.
link an image to a document file
I figured it out! Had to do some fiddling with css to make it work but it looks fine now. In my theme, there was link styling like this: a { padding: 5px 0; display: inline-block; }So I added...
link an image to a document file
Separately, I had built a site for a friend some years ago using D8 but she found it too difficult to use and so it never gets updated. I was thinking of converting it over to Backdrop, hence my post...
link an image to a document file
@keiserjb - Thanks for your suggestion. You say: it is a solution for a field, not really adding pdfs to a body field. So this also is for a file field, though taking a little different approach,...
link an image to a document file
Almost there: see https://docs.backdropcms.org/api/backdrop/core%21includes%21file.inc/fun... // Delete the file. file_delete($file_fid); rather than: // Delete the file. file_delete(...
error messages after making a backup