Set dynamic Favicon for logged out users

Hey, everyone.

I need help with setting a dynamic Favicon for my app. I’m using a custom data page HTML header to get the current user’s Favicon on each page. This works fine except for the sign-in, reset password, and 404 pages, where users aren’t signed in.

Our app uses a white-label setup, so I was trying to get the subdomain (like subdomain.example.com) to set the Favicon. As shown in my screenshot below, I tried using regex to extract the subdomain but found out that it’s not possible to reference the URL or website home URL as data sources inside the page HTML header.

s

So, how can I find out which app a user belongs to and update the Favicon without them being signed in? If anyone has a solution for this, please share it. I’m struggling with this issue and need it fixed for the sign-in, reset password, and 404 pages.

For all other pages where users are signed in, I have no problem retrieving their dynamic Favicon.

Thank you!

You can only use the current user, page thing, search, option or arbitrary text

Try using arbitrary text, as that then allows you to use the URL

Hey @boston85719, thanks for your reply. I can’t seem to get a subdomain using Get data from URL. It doesn’t look like it’s an option. I’ve read the documentation and it only gives what’s after the domain, not before… I’ll give it a try anyway.

UPDATE:
It doesn’t seem possible to do this. I still don’t know how to achieve what I need. Maybe there’s a smarter solution I haven’t thought of yet. But it looks like it’s impossible to get the URL using Bubble’s default data sources.

try using the ‘this url’ and then some filters like contains or regex extraction. I couldn’t imagine that the subdomain is not accessible as it is basically the URL.

@boston85719, unfortunately, I can’t find the “This URL” option, not even in the arbitrary text. I only see the option called “Get data from page URL”, but it doesn’t let me get the subdomain.

I agree, it’s strange because this “Get data from page URL” actually returns the URL, but it doesn’t return any subdomain. I’ll keep trying to find a solution. Maybe I need to code something with JavaScript. I’ll check the Bubble documentation again, but it doesn’t seem to let me extract anything before the domain name.

This topic was automatically closed after 70 days. New replies are no longer allowed.