Something like I have above some images on my travel providers page?
No that was not an easy setup, but you can do just about anything with this plugin and some html and css knowledge (and creative thinking)
Yes, thanks, that’s how I need it.
Where do you save the information? Of course, I could use any other field of the links, save there the language code and then replace that code in the output with a flag, using jQuery. But I thought there could be an easier way.
Yeah you need to sacrifice one of the fields, that’s where you save your information. My setup is class-based and I’m not using any scripting.
A simplified version of what I do is use the field before and after to put in html:
before:
<div class="someclass
after:
"></div>
Make sure there’s a trailing space in the before field.
Then simply put 1 or more classes (eg country name) in the link field you use, and style those classes with the flag as background image (or image background position if you want to use an image sprite). Use someclass for your other styling (and maybe your image sprite url)
Of course you could use the field as img src, but if you ever want to change things you need to edit those fields, now you only change the stylesheet.
In my setup I actually use the before of the first field and I close it in the after of the last field, so the whole box gets those classes. Useful for other purposes (including scripting).
If you have any questions just shoot π
That’s a very clever solution, thank you very much!
You’re welcome. Let me know how it goes!
Thanks for the help Yezzz
My pleasure. Just giving back a little. Let’s see when Chris gets things done π
I’ve posted the link already above.
Yeah, saw it, but didn’t see any flags. Seeing them now. Are you using js to add the classes? (and divs)