Template:Jmol general: Difference between revisions
Jump to navigation
Jump to search
Carl McBride (talk | contribs) m (tmp change) |
Carl McBride (talk | contribs) m (tmp save) |
||
Line 21: | Line 21: | ||
<jmolApplet> | <jmolApplet> | ||
<script>set spin X 10; spin on</script> | <script>set spin X 10; spin on</script> | ||
<size> | <size>300</size> | ||
<color>lightgrey</color> | <color>lightgrey</color> | ||
<wikiPageContents>{{{1}}}</wikiPageContents> | <wikiPageContents>{{{1}}}</wikiPageContents> |
Revision as of 16:58, 6 February 2015
Useage: {{Jmol_general|File.etc|Caption}}
THIS TEMPLATE DOES NOT WORK.
I do not know how to (or even if it is possible) to pass template arguments to <wikiPageContents>.
I.e. 1 is not substituted in the <wikiPageContents>{{{1}}}</wikiPageContents> container.
wikiPageContents takes {{{1}}} literally. Not sure how to change this, perhaps a small rewriting in Jmol.body.php? -- Carl McBride (talk) 13:28, 28 August 2008 (CEST)
- SOLVED. Wikitext inside the Jmol Extension markup was not being interpreted. The fix is to use
#tag
syntax, available since MediaWiki 1.12:- substitute
<jmol>
by{{#tag:jmol|
- substitute
</jmol>
by}}
- substitute
- --AngelHerraez 12:24, 25 May 2009 (CEST)
Note that in this template page the JmolApplet will display an error (because it has no proper content loaded into it), but it will work in any page that inserts the template.
<jmol> <jmolApplet> <script>set spin X 10; spin on</script> <size>300</size> <color>lightgrey</color> <wikiPageContents>{{{1}}}</wikiPageContents> </jmolApplet></jmol> |