Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same nav on multiple sites #47

Closed
nflorentin opened this issue Mar 26, 2020 · 3 comments
Closed

Same nav on multiple sites #47

nflorentin opened this issue Mar 26, 2020 · 3 comments
Assignees
Labels
enhancement Improvements to existing features pending release 🔜 Issue has been fixed but fix has not been released yet sites 🌎 Multisite related issues

Comments

@nflorentin
Copy link

Hi,

I don't find how to have automatically the same nav on multiple sites. I'm developing a project available in 2 languages so I have 2 sites. My navigation will be the same on both sites, so I wonder if it is possible to have the second site using the exact same nav as the first one without having to make two times the same configuration.

I think that the plugin does not have this feature. Perhaps there is some hacky way to do that ?

Thanks for your work!

@janhenckens
Copy link
Member

Hey! You're right, that's not possible right.
Off the top of my head, here's how I'd like to solve it: make craft.navigate.getRaw() take a second option parameter where you can pass the site it. If you don't pass anything there, we'll use the current site.
In your case you could do craft.navigate.getRaw('handle', craft.app.sites.getPrimarySite().id) and that should do the trick.

Does that sound good? :)

@janhenckens janhenckens self-assigned this Mar 26, 2020
@janhenckens janhenckens added enhancement Improvements to existing features sites 🌎 Multisite related issues labels Mar 26, 2020
@nflorentin
Copy link
Author

Janhenckens, that's a perfect solution and not hacky at all :).
Thanks you very much!

janhenckens added a commit that referenced this issue Mar 27, 2020
@janhenckens janhenckens added the pending release 🔜 Issue has been fixed but fix has not been released yet label Mar 28, 2020
@janhenckens
Copy link
Member

@nflorentin included in today's update, can you give it a try? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements to existing features pending release 🔜 Issue has been fixed but fix has not been released yet sites 🌎 Multisite related issues
Projects
None yet
Development

No branches or pull requests

2 participants