I want to add a new topbar-menu (to toggle the application language). I was hoping I could use the existing classes and scripts, so I simply duplicated `<ul class="topbar-menu">` in the topbar.xhtml file. This kind of works, after adding the CSS rule `.layout-topbar .topbar-menu { float: left; }`. The only thing is that both menu's can be opened at the same time. After having looked at the layout.js file, I'm not so sure if multiple menu's are supported, because of only having a single `$this.topbarMenuClick` boolean.
Is having multiple menu's ment to be supported and am I doing something wrong here? Or should I throw in something like a selectOneMenu?
Adding a new topbar-menu
Forum rules
Please note that response time for technical support is within 3-5 business days.
Please note that response time for technical support is within 3-5 business days.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub: https://github.com/jepsar
Spotify: 90s Rave, Acid, Trance, House
GitHub: https://github.com/jepsar
Spotify: 90s Rave, Acid, Trance, House
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
- This is related to your needs. I think you can do it with only one topbar-menu like;should I throw in something like a selectOneMenu?
Code: Select all
// topbar.xhtml
...
<div class="topbar-right">
<ul class="topbar-menu">
// other items
<li class="language-item">
<a tabindex="0">
<i class="pi pi-home"></i>
<span class="topbar-badge">2</span>
</a>
<ul class="language-menu">
<li>
<a tabindex="0">
<i class="pi pi-home"></i>
EN
</a>
</li>
<li>
<a tabindex="0">
<i class="pi pi-home"></i>
TR
</a>
</li>
</ul>
</li>
// other items
</ul>
</div>
Github Profile: https://github.com/mertsincan
Great, thank you so much! That at least leaves me with multiple options
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub: https://github.com/jepsar
Spotify: 90s Rave, Acid, Trance, House
GitHub: https://github.com/jepsar
Spotify: 90s Rave, Acid, Trance, House
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Glad to hear, thanks a lot for the update
Github Profile: https://github.com/mertsincan
One small detail about the suggested solution is that the styling is off when using `language-item` and `language-menu`, so I reverted to using the profile classes. I think they could be more generic, like `topbar-right-item` and `topbar-right-menu` instead of `profile-name` and `profile-menu`.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub: https://github.com/jepsar
Spotify: 90s Rave, Acid, Trance, House
GitHub: https://github.com/jepsar
Spotify: 90s Rave, Acid, Trance, House
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Hi,
Thanks a lot for your feedback! We'll pay attention to it.
Best Regards,
Thanks a lot for your feedback! We'll pay attention to it.
Best Regards,
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 5 guests