Tag a before tag img
Permalink
I have a problem: I want that the my client could inset in the main block a image and the cms write:
I need this to create a lightbox... in the theme.
It is possible?
Maybe with php?
An alternative would be if I could (with php) have the url of the image ...
Thank you
<a href="link of the image" rel="a word set"><img src="link of the image"/></a>
I need this to create a lightbox... in the theme.
It is possible?
Maybe with php?
An alternative would be if I could (with php) have the url of the image ...
Thank you
OK but I wanted to install Facybox on my theme...
OK. What exactly is the problem or question about that?
Fancybox needs tris code
for every image... Look at the site of fancybox...
So when my client inserts the image intorno the page I need a link to the image before the tag of the image...
OK?
Thank you!
<a href="link of the image" rel="a word set"><img src="link of the image"/></a>
for every image... Look at the site of fancybox...
So when my client inserts the image intorno the page I need a link to the image before the tag of the image...
OK?
Thank you!
Did you look at the "Zoom Image Dual" addon in the marketplace? It's free, and it sounds like it does exactly what you want it to do.
Ok but I am building a theme and I am trying to imstall fancybox in the theme without any add-on... Like the SLATE theme...
I don't think you can do this without an addon, unless you make a custom template for the content block that rewrites html before it's outputted -- but that's a rather advanced and error-prone technique (and doesn't give your users the options that a block would give them, such as being able to set the image sizes or the lightbox animation effect settings).
There's nothing wrong with including a block in your theme package -- many themes do this.
There's nothing wrong with including a block in your theme package -- many themes do this.
But with php code can I get the url of the image that the user inserts into the page?
Anything's possible, it's just a question of how much technical skill you have and/or how much time and effort you want to put into learning it, implementing it, testing it, fixing bugs, etc. Google around for "php html parsing" if you're interested.
OK I have found it!
I will use Jquery
I will use Jquery
http://www.concrete5.org/marketplace/addons/zoom-image-dual...
If you want to create these for yourself instead, I believe Designer Content would be ideal for this situation:
http://www.concrete5.org/marketplace/addons/designer-content...
For the lightbox, you'll need to put the lightbox javascript in your page type template. The difficulty is going to be putting that "rel" tag on the <a> link. Is that essential to your lightbox code?