How to make a button a certain color when user is in home page?

Hey! I’m having a small problem that I’m sure has a simple solution.

I’m trying to change a button’s color when the website is in its home page. I usually use page parameters on other pages but since the home page doesn’t initially have parameters I can’t seem to be able to point out in the conditions that the current page is home page therefore the button should be X color.

Any advice?

Add a conditional like this but change the index to your home page name
This is available in a reusable element but I’m assuming that’s where your button is
button

Hello @jeronimo ,

Here is the solution to your problem.

Create a custom state and start a workflow on page load set the value of the custom state (static value). Afterward, open the condition of the button and set the condition that when the custom state value is XYZ the background of the button will change to this color.

If any further assistance is required please contact me on:
LinkedIn:- https://www.linkedin.com/in/karamjitsinghwaldi
Gmail:- [email protected]

Thanks for the reply!

I tried doing that, but the button is not in a reusable element, therefore I don’t really know why, that condition is not available.

Thanks for the reply!

I also tried doing this but when home page refreshes the value of the custom state is reset.

If it’s not in a reusable element then where is it?

If it’s just a regular button (not in a reusable) then just make a new style with the color you want for that button

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