Image block lightbox
Permalink 1 user found helpfulthis is my first time with concrete5 - it's a very good and simple cms - the docs are great but I can't find:
How to enable lightbox for the image block?
:) Thank you!
---
Edit:
Sorry, more informations:
- I use my own theme
- I use 5.7
thank you for this information.
But to the core team:
Why there is no option to open the image in a lightbox when using image block?
Thank you!
Are there docs for it (e.g. how to integrate lightbox2)?
Thank you!
http://lokeshdhakar.com/projects/lightbox2/#getting-started...
You can override the template of the "Image" block type, but getting your lightbox/popup plugin to work is priority #1. Then change the template to how it should be.
It is also a very solid one that works pretty much flawlessly.
I think I need to load it in my page_theme.php (register assets)?!
http://documentation.concrete5.org/developers/appendix/asset-list...
I think its core/lightbox
If you do it that way, the script will load on every page unless you write dome logic to select specific pages.
But since you are going to have to write a template for the image block anyway, to add settings for magnific popup, you can simply require the asset (the lightbox script) from the template itself.
Thank you very much!
https://documentation.concrete5.org/editors/dashboard/system-and-mai...
The 'concrete5 Link'-plugin provides an image lightbox creation, which can be activated by choosing the 'lighbox'-Option in the Dropdown-Menu 'target' of the link attributes. This way clicking on the image opens a lightbox, which inspecting the created markup seems to rely on 'Magnific Popup' shipped with the concrete5-package.
Important: The 'lightbox'-Option is NOT in the dropdown of the link-option of the 'image'-plugin. You have to put the link on the image by clicking on the 'link'-icon in the text-editor-menu-bar. There you can find the 'lightbox'-Option (see screenshot in the file attached).
Being no programmer, I spent two days based on this thread trying to figure out a workaround for the missing lightbox-option in the core image block, and was already on the way to try 'copy-paste-image-block-to-packages-folder' + 'page_theme.php > requireAsset('core/lightbox') + 'code-analyzing-"finicking" in the copied image block'.
Happily enough this morning I came through the built-in-'lightbox'-Option in the content block, which saves me uncounted hours of 'coding-trials'.
So I thought to post this here for other people looking for information about built-in-lightbox-facilitiy in concrete5.
You can, however, insert an image in a content block, MAKE IT A LINK and CHOOSE TO OPEN the link IN A POPUP
By that time, unfortunately I didn’t catch right, what he meant. Anyway: at last we know now, what to do.
;-)
https://www.concrete5.org/community/forums/customizing_c5/lightbox-w...
Can anybody confirm, working perhaps in another theme than Elemental?
I experience this in three different websites, each of them built with an individual theme, two of them running concrete5 version 8.5.5, one of them version 8.5.2. When blockcache is turned on, the image doesn’t open in an overlay as lightbox, instead it opens in a separate window of the browser, similar to as if you had right-clicked in the browser on the image and chosen to show the image in a separate tab of the browser.
I realized the bug while testing after some developing work. Strangely in first place I thought it had to do with two-column-design, because the bug showed up only after revisiting the same page with the two-column-design. Later I realized, that the bug showed up also in pages without two-column-design. Also strangely on some pages the bug shows up instantly after turning blockcache on, in other pages only several hours or days after turning blockcache on. On the other side the bug disappears instantly after turning blockcache off and clearing the cache.
Hope this helps a little in tracking the bug. Sorry for reply with delay, I do webpublishing work only from time to time.
the image block doesn't offer a popup functionality.
You can, however, insert an image in a content block, make it a link and choose to open the link in a popup