User:AngelHerraez/Sandbox2: Difference between revisions

From SklogWiki
Jump to navigation Jump to search
(use new template variant)
(use redirected template)
 
Line 1: Line 1:
== Simple use of Chembox_3DStruct ==
== Simple use of Jmol_Link_Popup template ==
A use of the Chembox_3DStruct_Simple 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.
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:
 
  <nowiki>{{Jmol Link Popup|Water.pdb}}</nowiki>
Let's change the template so that it uses model files uploaded as wiki pages. This code:
renders as:
  <nowiki>{{Chembox 3DStruct Simple|Water.pdb}}</nowiki>
{{Jmol Link Popup|Water.pdb}}
renders so:
{{Chembox 3DStruct Simple|Water.pdb}}


Another example:
Another example:
  <nowiki>{{Chembox 3DStruct Simple|Benzene.pdb}}</nowiki>
  <nowiki>{{Jmol Link Popup|Benzene.pdb}}</nowiki>
renders so:
renders as:
{{Chembox 3DStruct Simple|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!