Board Thread:Support Requests - Getting Technical/@comment-26878768-20150827095803

Hello, I have a few questions. We are in the process of a major cleanup on an old wiki, trying to minimize the quantity of templates to make it easier for our contributors.

How do you get a "What links here" for surrogate templates? Some of our surrogates seem unused/unnecessary. I can't find a way to identify if they are used or not. I also have 2 bots, so if you know of a way to figure out if surrogates are really used using pywikibot or autowikibrowser that would be greatly helpful!

In DPL, how can you include by CSS class? Is there any way at all, or I have to mark sections/use some other means?

edit: On more DPL question. How do you deal with templates that use PAGENAME in includes/surrogates? For example, if I include a template that uses PAGENAME, it will use the calling PAGENAME instead of the included page. Is there such a thing as "includeparsed"? Something along those lines.

Switch cases newlines are the bane of my life currently (https://meta.wikimedia.org/wiki/Help:Newlines_and_spaces). Does anyone know a clean way to "format" the code without introducing newlines? Currently we use either: no newlines in code, which is atrocious. Or comments, ex:

This is also unreadable/disgusting, especially in really big templates.

Thank you for any help. Good day. 