is there a reason why Xenforo Tabs in addons don't have real URLs ?

Digital Doctor

Well-known member
ie.
http://www.xfshowcase.com/showcase/clip-the-apex.41/
if I click the Image Gallery Tab
... the image gallery tab doesn't have a real URL.
http://www.xfshowcase.com/#timages
So I can't direct people to that tab specifically.

I've seen this in all? Xenforo tab addons ?

Is there a reason ?

Other than not being able to direct someone to that specific tab ... are there other issues.

BTW, bobster65's showcase addon is killer :)
(he should make a lite gallery).
 

ManOnDaMoon

Well-known member
Their contents are displayed/loaded via javascript/ajax, so there is technically no need for a direct URL. Eventually, I'd also prefer a URL too.
 

MOZ

Well-known member
The page is loaded in one request, making it faster to switch between tabs and reducing load on server as only one request is made as opposed to multiple requests.
 

Chris D

XenForo developer
Staff member
It's the same with the member profile tabs, to be fair.

Would also be useful to have some way of directly linking that.

IIRC there's some code in xenforo.js that indicates this was going to be implemented in the future.
 

Mr. Goodie2Shoes

Well-known member
It's mainly because of the 'base' tag e.g
HTML:
<base href="http://xenforo.com/community/" />
For the showcase add-on... it can be fixed by adding:
HTML:
{$requestPaths.requestUri}
before the hash(s) which bobster will hopefully add ;)
 

Sheldon

Well-known member
I hope it isn't added for Showcase. If someone is interested, it's not hard to click the tab.
 

Bob

Well-known member
You CAN do direct links, but the link that DD posted was missing the ITEM route (http://www.xfshowcase.com/showcase/clip-the-apex.41/#timages) This link will actually take you directly to the showcase item and open the Gallery Tab. When viewing the ITEM, the tab links are different than they are when viewing the discussion. When in the discussion thread, the tab links have the route appened to them.. they don't need that when you are directly view the item.
 

Mr. Goodie2Shoes

Well-known member
Here is the discussion thread: http://www.xfshowcase.com/threads/clip-the-apex.460/

You will see that there are 4 tabs. If you click on any one of them, it will take you to the showcase item and open that particular tab.
yes, I have seen that... they are added in the thread view because you have something like:
Code:
href="{xen:link showcase, $item}#timages"
so the route and action is being added... but for the item view page it's something like:
Code:
href="#timages"
and because of the 'base' tag (like I said earlier)... the browser sees the hash as '{the-base-url}#timages' instead of '{the-base-url}/showcase/item.id/#timages'...
 
Top