User:AngelHerraez/Sandbox2: Difference between revisions

From SklogWiki
Jump to navigation Jump to search
(first attempt at the Chembox templates)
 
(use redirected template)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
A use of the Chembox_3DStruct template that puts a link with the molecule name leading to a pop-up window with Jmol. <s>The molecule should be uploaded as a file.</s> File types not allowed in this Wiki.
== Simple use of Jmol_Link_Popup template ==
 
This template puts a link with the molecule pagename leading to a pop-up window with Jmol. The molecule should be a model file uploaded as wiki page. This code:
Let's change the template so that it uses model files uploaded as wiki pages. This code:
  <nowiki>{{Jmol Link Popup|Water.pdb}}</nowiki>
  <nowiki>{{Chembox 3DStruct|Water.pdb}}</nowiki>
renders as:
renders so:
{{Jmol Link Popup|Water.pdb}}
{{Chembox 3DStruct|Water.pdb}}


Another example:
Another example:
  <nowiki>{{Chembox 3DStruct|Benzene.pdb}}</nowiki>
  <nowiki>{{Jmol Link Popup|Benzene.pdb}}</nowiki>
renders so:
renders as:
{{Chembox 3DStruct|Benzene.pdb}}
{{Jmol Link Popup|Benzene.pdb}}


Works OK!
Works OK!

Latest revision as of 01:11, 26 May 2009

Simple use of Jmol_Link_Popup template[edit]

This template puts a link with the molecule pagename leading to a pop-up window with Jmol. The molecule should be a model file uploaded as wiki page. This code:

{{Jmol Link Popup|Water.pdb}}

renders as: 3D structure: <jmol><jmolAppletLink>

  <wikiPageContents>Water.pdb</wikiPageContents>
  <text>Water.pdb</text>
</jmolAppletLink>

</jmol>

Another example:

{{Jmol Link Popup|Benzene.pdb}}

renders as: 3D structure: <jmol><jmolAppletLink>

  <wikiPageContents>Benzene.pdb</wikiPageContents>
  <text>Benzene.pdb</text>
</jmolAppletLink>

</jmol>

Works OK!