-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Content table impractical in layout - belongs in the sidebar #2
Comments
Would just like to mention that I'd really like to see this as well, and since I'm new to this site and don't yet know how to be notified of changes, would love to hear if the status on this is changed/fixed |
And nearly a year later, I've done something about this! :-) Sorry it's taken me so long. Download the new version, and let me know what you think. @worldsight's idea was correct: overriding For completeness, I'll just note here that there is also mozilla.org bug 551200 which is trying to solve this same problem (with a different skin). |
Great, seems like my cache isn't refreshed until a page is edited, but apart from that it seems to work nice from what I've had time to test. Thanks a lot! |
Because of the layout attributes (font size, column size), the table of contents (toc) inserted by Wikimedia pretty much takes up so much real estate that it is impractical to have a toc, forcing the usage of notoc in all the pages.
I tried to edit the template by adding a way to move the toc to the sidebar, which is really where it belongs in this layout. The code I tried was the following, but it was not successful, because it looks like Wikimedia actually caches the toc.
In the class SkinTwentyTen, I added a method to override tocList found in Linker.php. The idea is to have this function return nothing, but transfer the contents to savedTOC and use a "print $this->skin->savedTOC" to display the contents in the sidebar.
However, turns out this function is only called when the content of a page is updated, but not during a simple page view. It gets cached the rest of the time, and I don't know what the function is that Wikimedia uses for the cache.
I will continue to try to work around this and come up with some code that consistently stores the toc inside the template so I can put it in the sidebar, but if you happen to have a simple way to get it into the sidebar, that would be a great improvement to this skin.
The text was updated successfully, but these errors were encountered: