Flags for langmenu & visited links

2 views
Skip to first unread message

Infini

unread,
Feb 14, 2011, 12:55:47 PM2/14/11
to Edicy Designer
Bonjour,

FLAGS FOR LANGMENU
For the language menu, is there a way to link to a picture : an
estonian flag instead of ES, a French flag instead of FR ?
I could not find a way in the menu codes.

VISITED LINKS
You have a "selected?" property in Menuitem. It allows to style active
links.
How to style visited links ?
How to style visited links with a picture ?

CURIOSITY
After customizing a standard Edicy design, the stylesheet link still
shows the name of the design (eg: tallinn) at the end of the
stylesheet name. Is there a purpose ?

Infini

unread,
Feb 15, 2011, 2:37:22 AM2/15/11
to Edicy Designer
Please ignore my question about Visited Links.
CSS should allow me to do it.
Tks

Priit

unread,
Feb 15, 2011, 12:41:11 PM2/15/11
to Edicy Designer
Yea, css let's you do the tricks with visited links.

It is possible to use pictures in language menu. Only you have to
follow the certain rules when naming these pictures.

When looping through the languages in menu, link to images with
something like this:

{% for language in site.languages %}<a href="{{ language.url }}"><img
src="/images/flag_{{ language.code }}.png"
title="{{ language.title }}" /></a>{% endfor %}

Now if you upload images with spanish and french flags, respectively,
"flag_es.png" and "flag_fr.png" then these images will be shown in
language menu.

Another way to do this is to use flags sprite, e.g.
https://github.com/lafeber/world-flags-sprite and let css class names
to take care of the rest, in this case your markup code should look
like this:

{% for language in site.languages %}<a href="{{ language.url }}"
class="flag {{ language.code }}></a>{% endfor %}


You are free to remove the design name from the stylesheet path of
your custom design. Edicy uses them to make sure that the correct
stylesheet gets loaded when user switches between centralized designs.


Cheers,
Priit.

Infini

unread,
Feb 16, 2011, 4:59:25 AM2/16/11
to Edicy Designer
Nice.

I'll try to implement it.

Thank you.
Reply all
Reply to author
Forward
0 new messages