Displaying a company logo on a Portal page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2025 12:30 AM
Hi folks,
My requirement is to have the Logo in my Portal Theme Header vary according to the Company that the logged in user is a member of.
So when I log in as a user of Company X I want to see the header logo as Company X's logo.
Same if I log in as a Company Y user.
I have cloned the appropriate Portal/Theme Header widget so I don't break OOB behaviour.
In my cloned widget I have added Server script to dot-walk from the user record, to the company record and I retrieve 2 different values:
gr.company.getDisplayValue() - returns Company Name as a string - works perfectly
gr.company.banner_image_light - does not obviously fail (but might be silently failing I suppose)
I then also have HTML code in the HTML Template section of the widget:
Displaying the Company name - works as expected
Displaying the Company logo - only produces the alt attribute text I defined in the <img> element
My company definitely has the logos defined - I uploaded them to the Company record (both UI16 banner image and Banner image, to be sure to be sure !!!)
I am passing the values I retrieved from the server script up to the HTML via the standard "data.new_field_name" trick.
- set in the server script
- retrieved in the HTML code as {{data.new_field_name}}
-- company name is shown as straight HTML and works fine.
-- the logo I am attempting to show inside an <img> tag, but all I see is the alt text.
I believe the image fields store a link to the image as a URL, but I am unable to locate the images in the db_image table so I am wondering if that may be my problem. I uploaded the logos via the Company form and my assumption is they will land where they need to. A list view of the company record shows the image logos as expected.
I am pretty sure I missing something really dumb !!!!
Any tips / pointers would be very well received !!!!!
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2025 12:45 AM
Code snippet from the HTML section:
Green box code works
Red box code does not