XF 1.5 Site logo link vs HOME button.

Bill Stuntz

Active member
Under vB, our organization's logo was linked to the main NAWCC web site, and the HOME button was linked to our message board's home page.
Under XF, they both go to the same location, ONE of which is always wrong. Is there a way to separate them in XF? The main NAWCC web site needs to be easily accessible via the logo for our MB users, but the HOME button shouldn't take them there. It should take them to the MB's home page, not the organization's home.

We initially modified the logo to indicate that it links to the MB home page, but were forced to change the link because our users complained that the main NAWCC web site was no longer directly accessible via the logo. But now, the HOME button doesn't take them to the correct home. Yes, the FORUMS button takes them there, but they're confused. Either way we set it, it's wrong.
logo vs home.webp
 
That particular behavior would likely require some template modifications to achieve. I don't particularly recall someone asking for it.

You can achieve the opposite where the logo takes you to the opening page of the forum and "home" still links to your site home. This would be done by disabling the "Link Logo to Home Page URL" option.
 
Thanks, but that won't work very well for our users. They've been clicking the logo when they want to go to the main NAWCC web site for years. MANY of our MB users are not dues-paying NAWCC members, and the main NAWCC web site doesn't seem to interest them very much. We want to encourage them to join. The incorrrect HOME button doesn't seem to bother them as much as the wrong logo target bothers the users who ARE NAWCC members. And the FORUMS button does take them directly to the MB home page. Maybe we can/should make the HOME button disappear? But we don't really want to modify the core XF code/templates.
 
You're going to have to modify templates to get this behavior. The logo_block template contains the logo, including the link for the logo; you could change that to link to whatever URL you want the logo to link to. Beyond that, the "Home" link always goes to the "Home Page URL" link. It'd be your choice where you want to point that, though you can also just empty the value to remove that link (as it sounds like that's the "forums" link for you).
 
It's like that here, too - the "Home" button in the topnav goes to xenforo.com, but the logo links to /community/ when really shouldn't it link to xenforo.com?
 
You're going to have to modify templates to get this behavior. The logo_block template contains the logo, including the link for the logo; you could change that to link to whatever URL you want the logo to link to. Beyond that, the "Home" link always goes to the "Home Page URL" link. It'd be your choice where you want to point that, though you can also just empty the value to remove that link (as it sounds like that's the "forums" link for you).

I've tried changing the <a href="{$logoLink}"> to <a href="https://nawcc.org"> in that template, but the behavior doesn't change. It still links to mb.nawcc.org if I set the "Home Page" that way under options, whether I select "link logo to home page" or not. As we've discussed above, I can make it work "backwards" but not the way I want it. I don't pretend to be a "real" programmer, but I can usually get things to work for "minor" changes like this, even though I couldn't create it from scratch. What am I doing wrong?
<xen:hook name="header_logo">
<div id="logo"><a href="{$logoLink}">
<span><xen:comment>This span fixes IE vertical positioning</xen:comment></span>
<xen:if is="@uix_logoText"><h2 class="uix_logoText"><xen:if is="@uix_logoTextIcon"><i class="uix_icon @uix_logoTextIcon"></i></xen:if>@uix_logoText</h2><xen:else /><img src="@headerLogoPath" alt="{$xenOptions.boardTitle}" /></xen:if>
<xen:if is="@uix_sloganText"><div class="uix_slogan">@uix_sloganText</div></xen:if>
</a></div>
</xen:hook>
 
:confused: Dumb question: Why "Board URL" & "Home Page URL" under Options...Basic Board Info? How is "Board URL" used, if it doesn't point to the MB home page? In a "normal" configuration, I'd expect them to point to the same URL.
 
I've tried changing the <a href="{$logoLink}"> to <a href="https://nawcc.org"> in that template, but the behavior doesn't change. It still links to mb.nawcc.org if I set the "Home Page" that way under options, whether I select "link logo to home page" or not.
I just made this change locally and it worked as I expected. The only possible causes I can think of are:
  1. Based on the content of the template, you're using a third-party style. It's possible they've changed how this whole area works.
  2. The style you made the change in isn't the style you're viewing (or your edit isn't applicable to that style).
How is "Board URL" used, if it doesn't point to the MB home page? In a "normal" configuration, I'd expect them to point to the same URL.
The board URL is specifically used in emails, but they're not representing the same thing. For example, here the board URL would be https://xenforo.com/community (the root of XenForo) and the home page URL is https://xenforo.com/ (the root of the site).
 
  • Based on the content of the template, you're using a third-party style. It's possible they've changed how this whole area works.
  • The style you made the change in isn't the style you're viewing (or your edit isn't applicable to that style).
Thanks.
Yes, it is a third-party style by ThemeHouse.
Comparing that template to the default style, that section of code is the same at a glance, with different formatting in the code. I'll have to look at them (more carefully) side-by-side to see if there seems to be a functional difference. I'm not a good enough programmer to look them sequentially and have something jump out at me as "THAT'S different."
But I AM certain that I've been editing the currently active style. I've been changing & saving the template and/or the options..home page, and then refreshing the MB view in a different browser tab to see if the behavior has changed. But the logo never points to nawcc.org if the options..home page is set to mb.nawcc.org.
 
Back
Top Bottom