Forum Discussion

neel_psl's avatar
7 years ago

Customizing the 'SearchPage' skin

Hi,

 

We want to apply the different skins based on the category and the board context to the SearchPage, so can we do this?? Applying different skins to SearchPage or could we do it through API's???

 

 

Thanks

  • 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 =)!

    • lukClaudiusH,

      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

  • ClaudiusH's avatar
    ClaudiusH
    Khoros Alumni (Retired)

    The SearchPage is not tied to a structure. Just like the Settings or Profile pages it sits outside the community structure you have. The closest you can get is customize the search experience based on which location the user has selected. The URL contains two relevant parameters:

    filter=location

    and

    location=forum-board:studio

    You can create a custom component that uses the http.request context object to obtain these. Then match them against a list of nodes (categories, TKBs and boards) and either add a CSS class container or inject some styling accordingly.