Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: html different logo by logon user

  1. #1

    Default html different logo by logon user

    In pentaho 7, After login I customized the html page. I would like to display a different logo by logon user. Which html code should i write? The following is a mistake:


    If (Dashboards.context.user == "Demopier") {
    <Div style = "text-align: center;">
    <Img style = "width: 317px; height: 118px;" Alt = "Antoniana" src = "../ images / Logo_Anto.png">
    <br>
    </ Div>
    } Else {
    <Div style = "text-align: center;">
    <Img style = "width: 317px; height: 118px;" Alt = "B.I.Matica" src = "../ images / LogoBIMatica_m.jpg">
    <br>
    </ Div>
    }

    thanks in advance

  2. #2
    Join Date
    Nov 2011
    Posts
    1,229

    Default

    Dashboards.context.user is only recognized in the client-side context of a cDF/CDE dashboard.

    You probably need to get the user name from the server-side session object- PentahoSessionHolder.getSession().getName() or similar *should* do it.
    Pedro Vale
    --
    CTools Product Development
    http://www.webdetails.pt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.