Forum Discussion
Additional to ClaudiusH 's approach you could try to set a different skin (if you really want or have an entire skin for that =D) within the page init script:
this is completely untested!
<#switch http.request.parameters.name.get("location")> <#case "location-1"> <#assign skin = skin.set("<your.skin.name.for.that.location>") /> <#break /> <#case "location-2"> ... <#default> ... </#switch>
if you try it out, let me know if that works =)!
- vaishnavi8 years agoExpert
I would like to know if there is any way to get currently assigned skin id for a particular node?
As I would get the location id from search parameters, I want to check which skin is applied to that board before setting it to SearchPage inside page initialization or custom component.
I did not find any APIs to get skin mapped to a particular node.
Any pointers?
Thanks,
Vaishnavi
- TariqHussain8 years agoBoss
Ther is a context object for this ${skin.id} which will return you the id of the current skin.
https://freemarker-docs-portal.lithium.com/refer/contextObjects
- vaishnavi8 years agoExpert
Hi TariqHussain,
I want to know skin id set for a particular node, not for the current rendering node.
use case :-
1. community - skin id "base"
2. category1 (unique id is 200)- skin id "orange" (explicitly set from "Admin > Display> Skins" for this node)
3. category2 (unique id is 201)- skin id "blue" (explicitly set from "Admin > Display> Skins" for this node)
4.user searches some keyword(say 'test') from "location" filter for "category2"
SearchPage parameters will be
?filter=location&q=test&location=category:201&collapse_discussion=true
Requirement :-
Now I want to get skin id which is assigned to the searched location node (category:201) and want to set that specific skin id to SearchPage instance.
Thanks,
Vaishnavi
Related Content
- 9 years ago
- 5 years ago