Relative links in Ultimate Branding custom menu?

I want to create a custom menu in the admin bar for my multisite. I have discovered two odd behaviors.

1) When I create links using the "site page" option, those links end up being relative to whatever site of my network I am on. See screenshots. In my example, I created a link to a "site page" which I expected to be the home page of a subsite. But the actual link changes depending on the site I view it from. In the other screenshot, you can see that when hovering on that link from the "Resources" subsite, it wants to take me to a subpage of "Resources" (which does not exist). The only way around this seems to be with external links.

2) Every time I create a new link in the custom menu and click "Add" it saves all my changes and collapses the menu. So to add another link, I have to start completely over from the top: scroll down, open the menu, scroll down to add a link, etc. This is a lot of extra steps, and I don't see it happening in the tutorial video.

Is something wrong with my site? Support access enabled.

  • mabraham1

    Hi Ash,

    Thanks for the quick reply. And for making #2 a feature request. :slight_smile:

    About #1....I'm putting in a relative link because that's how the "Site Page" option works. So I get that. If I put in a full URL, it just appends that full URL to the main URL, making a real mess (see screenshot). So I do realize I can get around this behavior by selecting "External Page" and putting in a full URL.

    But this just seems really strange. I've got this plugin enabled at the network level on a multisite. It's not even available on the subsites. So what I do here -- this menu I'm creating -- is available on all sites in the network. So why would I want to create a link here that changes with each subsite it appears on?

    When creating the link, the "Site Pages" option appears to be creating a link that is relative to the main URL of the network, but it's really not (see the 2nd screenshot in my original message).

    I think this is buggy -- or at least confusing -- behavior that should be addressed in documentation, if not in function.

  • Ash

    Hi @kalico

    When you network activate Ultimate Branding plugin, it will work only at network level. To make it working in each subsite level, you need to network deactivate, and then activate in each site admin.

    I am not quite clear about the issue you are having, I am really sorry. Would you please attach the screenshots that you wanted to attach?

    Also, if you please give an example of what you want to achieve and what is showing in your site, would be very helpful.

    Cheers
    Ash

  • mabraham1

    Hi Ash, another screenshot is attached. I included annotations to hopefully make it more clear.

    What I want to do is create a menu at the network level (so yes, I do want my Branding to be network enabled, not site enabled). I want that menu to link to each subsite of the network.

    And really....I can do this. In fact, I've already done it. I had to use "External links" in the URL drop down, so I could make each link absolute instead of relative.

    So the problem here is no longer what I can or need to do. You've already cleared up the "how" for me. :slight_smile:

    I'm just pointing out that the way the plugin functions seems funky. If I've got Branding network enabled, then clearly I want all the functions I create to be network-wide. The plugin menu is not even available on any of the subsites. So for the plugin to offer me the option of creating a "site page" relative URL, and for the preview of that URL to display it as if it would be THE permanent link in the menu, is just....wrong.

    I can't think of any use case where this would make sense (maybe there is one, I just can't figure it out). It does make perfect sense to create relative links on subsites, if you're creating an admin bar menu that is specific to the subsite. But since that's not even possible with the network-enabled instance of UB, the option as it exists right now is very misleading. And I suspect the same problem would occur if I were making a link with the "admin page" option....but at least there you do have some (many) links that would be identical on all subsites.

    I hope that makes more sense now. Thanks for making the effort to grok this. :slight_smile:

  • Vaughan

    hi Kalico,

    As I understand it, this is correct behaviour when using a relative URL

    it will append to whatever subsite domain you are viewing. only the relative is stored in the DB. So when you simply add /test

    /test is stored in the DB.

    then when viewing the site itself, the domain is grabbed for the current site you're on & then the /test is appended to the end of it.

    You are correct that if you want it to always link to a specific page on a multisite, then you must use the full URL instead.

    Hope this helps

  • mabraham1

    Hi Vaughn,

    Thanks for the reply. I do agree that this is "correct behavior" for a relative URL. The issue here has turned from "is it working right" to "please improve the documentation and/or UI/UX".

    It is unclear and misleading that:

    - when the UB plugin is network activated
    - choosing the "site page" option from the drop down (and the "admin page" option as well)
    - creates a relative URL

    So I am simply suggesting that:

    - at the very least, the documentation should be improved to explain these nuances when the plugin is network activated vs site activated

    - the UX should be more intuitive and avoid user surprises (such as, in my case, testing the "site page" url in the menu I just created, and finding that the links I created are returning a 404 error and having to do lots of testing myself to figure out why, because nothing in the UI explained that I was creating a relative URL)

    - the UI should clearly show/tell the user what is really going on (what it does right now, i.e., displaying an example URL that *appears* to be absolute, but really is not, is very misleading when network activated, even though it's accurate when the plugin is site activated)

    I would hope this thread could be brought to the attention of the right people so that some action is taken to avoid misleading those who use the plugin on a multisite.

    But I am fine now in my own understanding of how it works. Ash was quite helpful on that front, and all is well from my own perspective.

    Thanks,

    Kalico :slight_smile: