Hello!!
I wish that we can put a custom image in the Tab section of Tabview, not just name, example:
[[tabview]]
[[itab "/local-files/icon1.PNG"]]
Content...
[[/itab]]
[[tab Another Tab]]
Content...
[[/tab]]
[[/tabview]]
It's useful if designer want a different image for each tab, but the image is more complex than a glyph. Example, if user put a travel website and use tabs for location, instead of putting "Sea", "Mountains", etc for tab title, s/he can put a small image of the said area for the title.
If the tab title can be oriented, this certainly can help if the tab is arranged veritcally.
I hope this can be realized!
This can be done with CSS and background images. Here is a quick and dirty example you can plug into a CSS module on a page with a [[tabview]] to get you started:
There is likely a cleaner way to do this without the use of "!important", but I'd need to spend more time on it than I have right now. You should move this question to the community forums where we can explore it more and expose the solution to more users.
Community Admin
That would only work if the page has fixed amount of active tab. Say the following scenario:
Page A requires tab A, B, C
Page B requires tab X, Y, Z
Page C require tab A, C, X
Page D is a template that can dynamically use any of the 3 tabs from A, B, C, X, Y, Z. I.e. pages that uses Page D template can have a combination of A, B, C or A, B, X or A, X, Y, and so on.
Won't all page have the same image tabs?
Your use case is more complex than what I was thinking. I don't think my hack will work with a variable tab combination without a lot of fiddling around.
The "nth-child(n)" selector is what targets a specific tab (counting from left to right), so they won't end up with the same image.
Community Admin
The YUI tabview documentation on Yahoo doesn't seem to have anything about images in the tab heading, and looking at http://usabilitygeek.com/14-guidelines-for-web-site-tabs-usability/ not one of the examples there has an image in the tab heading either. So perhaps it's not the best idea from a usability perspective.
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.