Implemented In addition to $extraTabs, lets have a $homeTabs

Jaxel

Well-known member
Jaxel I sincerely hope this changes make it to the gold. It will allow enormous flexibility to moders and to have a real portal.

I'm wondering with that code, what happens if another modification also makes use of the $homeTabs? It looks like it would show both. How does the code decide which one is first? And more eimportantly, wouldn't it be problematic for later having the forums at /forum? if /index is being fought between two+ mods?
Yes, it would show both... it decides which one is first by the listener priority, which can be modified.
 

Digital Doctor

Well-known member
I don't get why we can't just put a link to whatever we want in the home tab and change the name of the link to whatever we like?
Jaxel, and many other developers, try to keep "template hacking" to a minimum.
They know the heartaches that come from supporting their creations when alot of functionality is left to individual admins hacking code.
and then xenforo releases another version.
the template hacks break.
and more support needed.
etc.
 

anotheralias

Well-known member
Now truly, I'm not a coder, so I really don't see much of a difference in calling it either $homeTabs or $extraTabs, unless there is a complete style difference.
Thanks for the tip -- yeah, I'm not a coder either so when I see a page-long explanation for how to change a link, it freaks me out a little. I didn't think things were going to be that complicated.

Jaxel, and many other developers, try to keep "template hacking" to a minimum.
Oh, I do get that he's helping -- I wasn't expressing any of that at him.
 

Mike

XenForo developer
Staff member
I have implemented something like this for the next release. The approach is a bit different though. Importantly, it maintains compatibility with anywhere that is adding a tab. You then choose the "position" of the tab (home, middle, or end currently); this approach allows more flexibility while maintaining backwards compatibility.

If a user has an explicit home page URL entered, the "home" button will always appear and link to that page. If they don't enter a URL, then "home" will not appear and it will fall back to the first of the tabs in the home position; if there are none, it will use the forum tab as the home.
 

Brogan

XenForo moderator
Staff member
It was included in Beta 4: http://xenforo.com/community/threads/xenforo-1-0-0-beta-4-released.8732/

Removal of Home Tab/Link
If you do not enter a home URL in the options, the "Home" tab and link in the bread crumb will no longer appear.

Multiple Navigation Tab Positions for Developers
Developers utilizing the navigation_tabs event can now choose the position where their new tab will appear.
Additionally, if a user does not enter a home URL, the first tab inserted into the "home" position will assume that duty.
 

Digital Doctor

Well-known member
Removal of Home Tab/Link
If you do not enter a home URL in the options, the "Home" tab and link in the bread crumb will no longer appear.

Multiple Navigation Tab Positions for Developers
Developers utilizing the navigation_tabs event can now choose the position where their new tab will appear.
Additionally, if a user does not enter a home URL, the first tab inserted into the "home" position will assume that duty.
Oh yea.

That did solve many problems, except it didn't change one key thing:
users going to www.mysite.com are directed to the FORUMs by default.
Not so great having a Home Page that people don't land on.

Of course the work around is installing xenforo to a subdirectory and using the re-direct.

So it's like a Home Tab that people don't land on :(
 

Shadab

Well-known member
The framework supports programmatically replacing the homepage with your own route/controller/whatever setup; and moving the forum listing to, /forum/, for example. There were just two bugs which got in the way of doing this elegantly. Mike fixed them for the next release...
For testing purpose, I've set the recent activity page as default on my testbed: http://xf.geekpoint.net/
So far so good.

Once Beta 6 is released, I'll post the tutorial if needed. :)
 

Shadab

Well-known member
That wasn't exactly a bug, in my opinion. Workarounds were possible, but they were nowhere near as elegant as what we can do now that these two issues are fixed.
 

Jaxel

Well-known member
That wasn't exactly a bug, in my opinion. Workarounds were possible, but they were nowhere near as elegant as what we can do now that these two issues are fixed.
Any chance we can get that guide earlier than later? I'm okay with doing file edits for now, until the bugs get fixed in the official release. The reason I ask is that I'm running my portal on a production site and I wont like it to be the index.
 

Shadab

Well-known member
I look forward to that tutorial :)
This is exactly what I want to achieve but using a Page.
When I wrote it originally, I didn't have node pages in mind.
Had to change some bits to make the system more "generic". :)

Any chance we can get that guide earlier than later? I'm okay with doing file edits for now, until the bugs get fixed in the official release.
Here you go:
http://xenforo.com/community/threads/library-set-your-own-route-controller-as-homepage.10156/

The patches for XenForo_Link (beta 5) are provided in the 2nd post.
 
Top