Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Language Selection web part View modes: 
User avatar
Member
Member
Paul T - 12/27/2010 11:26:10 AM
   
Language Selection web part
I'm using the language selection (with flags) web part and am wondering I can...

(1) Change the order of the language links (they appear alphabetically)
(2) Add a "tooltip" to the link with the name of the language (i.e., "Chinese")
(3) Change the actual flag images and use our own images

Many thanks,
Paul

User avatar
Member
Member
kentico_michal - 12/28/2010 8:21:14 AM
   
RE:Language Selection web part
Hi,

The order of the links cannot be changed by design. In order to achieve this you will need to modify Language selection with flags web part (~\CMSWebParts\General\languageselectionwithflags.ascx.cs). You can do so in SetupControl method before following code is executed:

foreach (DataRow dr in ds.Tables[0].Rows)
{
string cultureCode = dr["CultureCode"].ToString();
string cultureShortName = dr["CultureShortName"].ToString();


Tooltips are also not supported, if you want to add them, you can do so in the web part code.

Images are stored in ~\ AppThemes\Default\Images\Flags folder, so you can replace them with images according to your needs.


Best regards,
Michal Legen

User avatar
Member
Member
Paul T - 12/28/2010 3:10:20 PM
   
RE:Language Selection web part
Thank you very much Michal for the thorough explanation. Paul

User avatar
Member
Member
uiterwijkjorik-gmail - 9/2/2011 8:20:58 AM
   
RE:Language Selection web part
I added the webpart languageselectionwithflags, and changed some of his properties (like showculturenames) in the code behind.

I still have a colored border around the flags, and don't like this.
How can I change this?
Does every webpart has a CSS-file? If so, where can I find this?

Regards,
Jorik

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 9/4/2011 3:17:24 AM
   
RE:Language Selection web part
Hi,

Which border you mean? If you mean the shadow, that is the way how the image looks like. Anyway, the styles are defined in a CSS style sheet. Moreover, you can use e.g. FireBug plugin in FireFox to quickly inspect the elements on the page and see their HTML markup and styles/classes applied for given element and change them in the style sheet.

Best regards,
Juraj Ondrus

User avatar
Member
Member
uiterwijkjorik-gmail - 9/5/2011 5:32:13 AM
   
RE:Language Selection web part
HI,

I found the map with all the images, and indeed there was the shadow. But it's not what i'm talking about.
There is a small border around each flag (ugly!).
Does every webpart have his own CSS-file? Or is this all together in one? Where can I find this CSS file?

Regards,
Jorik

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 9/5/2011 5:52:41 AM
   
RE:Language Selection web part
Hi,

Could you please post any screen shots? I still do not know which border you mean - in the default site template I do not see any borders around the flags.

Anyway, as I mentioned before - styles are defined in the CSS stylesheet, but not all of them. So, you can use the FireBug plugin to see which classes are generated around the flag elements and add/modify the classes in the style sheet.

Best regards,
Juraj Ondrus

User avatar
Member
Member
uiterwijkjorik-gmail - 9/7/2011 12:51:11 PM
   
RE:Language Selection web part
User image

Hi,

I found out that the border is only shown in IE and not in Chrome...


User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 9/7/2011 4:30:46 PM
   
RE:Language Selection web part
Hello,

Please try to debug the css style sheets in the Web Developer Tools for Internet Explorer to determine what is causing the mentioned border.

Best regards,
Boris Pocatko

User avatar
Member
Member
uiterwijkjorik-gmail - 9/9/2011 9:04:57 AM
   
RE:Language Selection web part
It's a very nice tool! But I didn't find anything with this tool. It only points to my own StyleSheet, this doesn't contain a border for the flags.

So is it possible that it is hidden in the css from the webpart? And that I can't see that, because I don't have the full source code?

User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 9/11/2011 5:15:30 AM
   
RE:Language Selection web part
Hello,

Actually, those borders need to be define somewhere in the CSS stylesheet, the default one assigned to your site (http://devnet.kentico.com/docs/devguide/css_overview.htm) or in any custom one. It is very hard to say what exactly causes this behavior unless we see it directly on your site. Therefore, by any chance, is your site live?

If not, I would recommend you to try the Firebug extension for Firefox browser which is a very powerful tool when it comes to HTML/CSS "debugging".

Another thing that come on my mind, if those borders are shown only in IE, please press the F12 key when in IE to enable the Developer tools (very similar to Web developer toolbar). This will allow you to inspect page elements as well.

Moreover, do you use any IE add-ons? If so, please disable them because it's possible they may cause such behavior.

Best regards
Ondrej Vasil