Return Genie Skin Name

Use this board to ask questions or have discussions with other Genie users.
Post Reply
ekidhardt
Profound User
Posts: 25
Joined: Mon Jul 03, 2017 1:35 pm
First Name: Ed
Last Name: Kidhardt
Company Name: Conestoga Wood
City: East Earl
State / Province: Pennsylvania
Country: United States
Contact:

Return Genie Skin Name

Post by ekidhardt »

Simple question:

Is there a constant in JavaScript that contains the Genie skin name? Or maybe a function to return it?

Looked through the docs and couldn't find one.
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Return Genie Skin Name

Post by Scott Klement »

I can't think of anything that is available on the JavaScript side of things that specifies the skin name. (It's possible that something exists and I just don't know about it, though... but you couldn't find it in the docs, either, so good chance there isn't.)

On the server, however, you can get it by calling PUISETENV. So you could run a program on the server that would get it, and then send it (via a hidden field on a display, for example) to the JavaScript code.
ekidhardt
Profound User
Posts: 25
Joined: Mon Jul 03, 2017 1:35 pm
First Name: Ed
Last Name: Kidhardt
Company Name: Conestoga Wood
City: East Earl
State / Province: Pennsylvania
Country: United States
Contact:

Re: Return Genie Skin Name

Post by ekidhardt »

So no go on the name of the skin - let me explain what I am trying to do.

We are trying to integrate Genie and Rich Displays, but are running into collisions with CSS - ideally we want a CSS sheet for Genie and one for Rich Displays. I was trying to find the name of the Genie skin to get at the Genie style sheet and disable it via the DOM; toggle it off when a Rich Display is loaded - toggle it on when we return to Genie.

Is there an easier way to achieve this behavior?
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Return Genie Skin Name

Post by Scott Klement »

Why not just use different class names (or other selectors, etc) so you don't have a conflict?
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Return Genie Skin Name

Post by Scott Klement »

I looked in the code, and it looks like the skin name is available in a JavaScript variable named "pui.skin".

Code: Select all

var skinName = pui.skin;
ekidhardt
Profound User
Posts: 25
Joined: Mon Jul 03, 2017 1:35 pm
First Name: Ed
Last Name: Kidhardt
Company Name: Conestoga Wood
City: East Earl
State / Province: Pennsylvania
Country: United States
Contact:

Re: Return Genie Skin Name

Post by ekidhardt »

Awesome - made my afternoon. Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest