Menu Item for Current Page Different Color (Newbie)

Hi,

I’m new and I haven’t been able to find any solutions to this on the Forum for changing the menu text items’s current page to a different color.

There are conditionals for hovered and pressed but not for the active or current page.

I tried the conditional of URL contains current page name which works but continues working when a different page is selected.

I’ve tried using a custom state of Current Page as yes/no with a workflow of 1) Set state Current Page of Text Contacts to value “yes” 2) Go to page Contacts. Then the Conditional on the text element Contacts as When This Text’s Current Page is “yes” then Font Color to #3D5C70. When previewing, the Contacts menu loads the contacts page but doesn’t change the color. But when I click it again, the color changes.

I have several menu items with sub menu items where I’d like the text menu item to display blue when the active page of the menu is selected.

I’m sure I’m missing something. Does anyone have any suggestions?

Thanks!

1 Like

You are clearing the custom state by navigating to a new page. Use a Page is Loaded event on the page itself to set your custom state.

Hi @Eli,

Thanks for the reply.

I think understand the idea.

I’m not doing it correctly I think because my menu is a reusable element.

On the Contacts page, I have When page is loaded set state of Current Page of contacts (page) to “yes”

When I go to reference this custom state of the page at an item (contacts link in menu) in the reusable element (menu), it directs me to edit the reusable element.

I’m getting stuck here. On the reusable menu text element Contacts, how do I reference back to the Custom State of the Contacts page?

You can’t reference a page or page element from a reusable element. That precludes the ability to reference a page or page element’s custom state as well.

There are multiple ways to do this but the easiest would probably be passing a url parameter. Give me a couple hours and I’ll take a second to make a little video showing you how to do that.

Make your app public and message me a link to it and I’ll do the video working with your actual app.

1 Like

@Eli

Here. removed
The Contacts and Projects pages are roughly build for learning purposes.

@msamandadianne, your app said I didn’t have permission to edit it but I created a basic replication of your menu.

Here you go.

8 Likes

@Eli

That worked! Thanks so much for explaining it to me.

1 Like

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