Content Block File Link Image Path Problem
Permalink
Hi There,
I am trying to build a feature where you can add a File Link to an Image in the content Block, and that Image then opens in a Lightbox instead of opening the actual link.
The Problem is, that if you add a File Link, the Link to the file is like:
/cms/index.php/download_file/view/xxx
This might be ok, if you really try to download something, but my lightbox doesn't accept a path, where the image is not directly there.
I already tried to override the content blocks view to find those links with regex and the replace the href of it by finding the image id in the original path and get the relative path of the image. But there has to be an easier way??
I also tried to override the editor config as suggested in this post:http://www.concrete5.org/community/forums/usage/image-paths/#101993... but i guess, that only works for actual images being added in the content block and not the file link.
Any ideas or thoughts?
Thanks
Jan
I am trying to build a feature where you can add a File Link to an Image in the content Block, and that Image then opens in a Lightbox instead of opening the actual link.
The Problem is, that if you add a File Link, the Link to the file is like:
/cms/index.php/download_file/view/xxx
This might be ok, if you really try to download something, but my lightbox doesn't accept a path, where the image is not directly there.
I already tried to override the content blocks view to find those links with regex and the replace the href of it by finding the image id in the original path and get the relative path of the image. But there has to be an easier way??
I also tried to override the editor config as suggested in this post:http://www.concrete5.org/community/forums/usage/image-paths/#101993... but i guess, that only works for actual images being added in the content block and not the file link.
Any ideas or thoughts?
Thanks
Jan