Forum:Template with opening tag only

Hello template gurus! :)

How do I create a template that contains an unclosed opening tag and a corresponding template with an unopened closing tag?

A little background: I'd like to add a little formatting to my JavaScript code but want it to be as unobtrusive as possible. For starters - and really: this is just the beginning - I'd like to create a template (or two) for the opening and closing source-tag. The template is supposed to be used like this:

What I've tried so far is this (and quite a few variations of it):

But it's not working. Either I get "| End =" rendered as JavaScript or the tag is inserted but not rendered.

Is there anything I can do to fix this? --


 * I have a similar template on w:c:disable:Template:Code that works exactly this way. You need to "break" the tag inside the template, so it's only included on the page but not on the template. Otherwise, the source tag breaks the rest of the switch parameter. Place the source tag inside an &lt;includeonly&gt; leaving the &lt; and &gt; outside. --Category:Ciencia Al Poder (talk) -WikiDex 10:46, September 2, 2012 (UTC)


 * You mean like this?


 * That doesn't work for me. It does output the correct tags, but the JavaScript code in between is not rendered.


 * Oh, I see what you did differently: You used the pre-tag. But why would I want to use the pre-tag when I could use the source-tag instead? But I cannot, can I? Maybe the syntaxhighlihter extension itself is the problem. It seems to hook into the wikicode-renderer at the wrong point in the rendering process. That would also explain why Staff can't seem to get the syntaxhighlighter to work on the message wall and in the up-coming forum...


 * Hmmm, it may be a problem of that extension, yes. I don't find syntax highlight very reliable, that's why I don't use it :P. --Category:Ciencia Al Poder (talk) -WikiDex 12:59, September 2, 2012 (UTC)


 * I wouldn't call the syntaxhighlighter unreliable. Apart from the fact that it never worked on the message wall, I never had any problems with it. The underlying code comes from the GeShi project. I've been using that - outside of MediaWiki - for years and was always quite happy with it. --