I'm a little confused if I can have different color Megamenus on each page via partials?

I know this topic was brought up before briefly in my overhauling the site in Foundry post but I’m still unclear on the answer. This is mostly due to my barrage of questions trying to do too many things at once. So I’ve decided to start a fresh post on the subject.

What I would like to know as I understand if from the last thread I can NOT make a mega menu partial which has the same links etc but then has a different color to match the different color schemes on each page? The different color set up is the only thing I am currently planning on using a partial for so I hope that is not the case.

But then it seems like someone else in that thread was saying you could do almost anything with a partial. If someone could set the record straight that would be much appreciated! The menu remains about the last thing have to do with phase one of the site. After that I can then get the Foundry re-write of my site uploaded.

You can use a partial for your mega menu with a base color and then use a little bit of CSS on a certain page to “overwrite” the colors, e.g. the menu background color:

In the partial set the background color, e.g. a light blue:

And on a page where you want to have a different background color, you set the nav-sticky-container class to a color you want (“white” in my example):

Unfortunately, the original color will briefly flash.

Quick demo: Display

1 Like

Partials are designed to make it so that settings sync up from page to page within a stack. What you’re looking to do by having varying settings on each page is not what Partials were designed for.

With your example the title is just coming up white right away for me. I don’t see blue flash when it loads. I have the CSS colors from the last page on hand if I wanted to type everything in again.

@elixirgraphics Okay, I thought a partial might work like an object style from page layout software. If it doesn’t work that way then I will have to think of some other way to do this. There aren’t all that many pages so having copy megamenu to each page and then set the color isn’t that big of a deal. If I need to start the process all over again when I make a change to the menu that should be okay, at least for now. If there got to be double the number of pages I would need to come up with a more efficent workflow but I think I’ll just do that for now.

Well, with the CSS snippet, you don’t have to do everything again. Just overwrite the specific attributes you need, e.g. the background color on the page where you want to. The other pages are not affected.

Okay I think I’ll do that the next time I need to add a page to my menu. My first upload of the menu will be just to get the site re-write up and then in a future update I’d like to get really exact with the color of the background, text, active and inactive areas, etc.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.