Shopping at LEGO or Amazon?
Please use our links: Amazon
As an Amazon Associate we earn from qualifying purchases.

Sets Database and Tabs

BorgataBorgata Member Posts: 22
edited April 2012 in The Database
Hi everybody, this is my first post here.

I'm writing this post for a request.
I use Brickset as a reference site for my sets (I think it is the faster, well updated and user friendly site for this), so I have a long list of Bricksets's pages in my bookmarks.
For each set, there is a page with various tabs: Main image, Minifigs, ... BrickLists, Links.
Every tab ha an address, such as "", with a number that identifies the tab.
I use to link sets using internal anchors, so that I immediately have the page I need.

The "problem" is that the number associated to a tab is not fixed, but may vary (and often do that!).

My request is: is it possible to associate every tab to a specific anchor number?
#ui-tabs-1 for the main page, #ui-tabs-2 for minifigs, .... #ui-tabs-10 for Links.

With this modify Brickset would be perfect for me.



  • BorgataBorgata Member Posts: 22
    As I didn't received answers, that puts me in doubt... is it the wrong section for this question?
  • HuwHuw Brickset Towers, Hampshire, UKAdministrator Posts: 6,457
    Sorry for the late reply. The anchors are allocated by the JQuery UI Tabs javascript plug-in and I don't think it's possible to specify what they are. But, I will look into it.
  • BorgataBorgata Member Posts: 22
    Thanks, I'll wait for any news!
  • BorgataBorgata Member Posts: 22
    edited May 2012
    I was thinking...

    If modify the plugin to associate numbers to types results to be too difficult or too complex, perhaps a simple solution could be to add a second anchor with the name of the tab, independent from the number.
    So, for example, the 6th tab representing links could have two anchors, the first is "#ui-tabs-6", the second "#links".
  • brickmaticbrickmatic Member Posts: 1,071
    Interesting. Not sure why it is a problem that the link is called "ui-tabs-2" instead of "alternate pictures" or whatever. That said, the jQuery UI Tabs is not the best for bookmarking specific tabs. There is, however, a workaround to this problem explained here:
    It uses the jQuery scrollTo plugin and its related localScroll plugin to make things work better.
  • BorgataBorgata Member Posts: 22
    edited June 2012
    Hi brickmatic, thanks for your comment.
    There is no problem about the name of the tab, the problem is that the name of the tab don't refers ever to the same tab, but can change.

    So I bookmark the "Links" tab, and one day I find that the link refers for example to the "Bricklists" tab.

    The workaround you suggested can go round this annoying (for me) problem?
  • brickmaticbrickmatic Member Posts: 1,071
    @borgata Unfortunately, no, it does not.

    The reason the anchors, which is what you're bookmarking, change is because they are dynamically generated by the plugin, as mentioned before. There is a special section in the code that the plugin looks at and will use to create the tabs. This section has a list of places that have data that will become the individual tabs. The plugin interprets this list and generates all of the code that results in what you see on your screen. When it does this, the plugin simply assigns the tabs anchors with numbers as it creates tabs, incrementing them sequentially. Since different pages have a different number of tabs, the number assigned each tab is not consistent across all pages.

    I'm pretty sure you can't just add an anchor into the special section that becomes the tabs because it will interfere with the creation of tabs. Modifying the plugin would be complicated. I don't see an easy solution to your problem.

    The workaround I mentioned above deals with a different problem: it isn't straightforward to bookmark individual tabs. What the workaround does is make the url in the address bar change when you go to different tabs. That way, you can just click on the bookmark button and don't have to right click anything. It also makes sure that when you visit a specific tab, you'll see the tab bar. You'll notice now that when you visit your bookmarks the tab bar is above the visible portion of the page.

    Also note, the demo in the workaround does not use the dynamic method of creating tabs and pulling content from a database. The tabs are static and the content is in the page.
  • BorgataBorgata Member Posts: 22
    edited June 2012
    Thanks, I've understood now what you mean before.

    The problem is that I've bookmarked hundreds of sets, and every time I access one of them I have to clik on the tab to obtain the data I want. So I thought to directly bookmark the tab I need.
    Get the link using rightclick is not a great problem, the great problem is to keep hundreds of links updated. It is an enormous waste of time, so simply I don't do that.

    I made a long work to bookmark all my bookmarked set, and later I noticed that a great number of bookmarks don't lead me to the desired tab (stupid me that I don't checked before...).
    So I asked here if there is a solution to my problem, but it seems there are more difficulties than I thought... (it seems to me so easy to modify the plugin...)
  • HuwHuw Brickset Towers, Hampshire, UKAdministrator Posts: 6,457
    The desired tab, from the site's point of view, is the eBay tab which is why it's the default. I don't plan on making it easy to change that.
  • BorgataBorgata Member Posts: 22
    edited June 2012
    Oh I understand, there is some benefit due to advertising.
    Damn... that's not a good thing for me! :P

    Thanks, anyway!

    (but could be that using a proper bookmarklet...)
Sign In or Register to comment.

Shopping at or Amazon?

Please use our links: Amazon

Recent discussions Categories Privacy Policy

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons! is a participant in the Amazon Services LLC Associates Program, the, Inc. Associates Program and the Amazon EU Associates Programme, which are affiliate advertising programs designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.

As an Amazon Associate we earn from qualifying purchases.