This old version of Proteopedia is provided for student assignments while the new version is undergoing repairs. Content and edits done in this old version of Proteopedia after March 1, 2026 will eventually be lost when it is retired in about June of 2026.


Apply for new accounts at the new Proteopedia. Your logins will work in both the old and new versions.


Template:Checkbox hide unhide

From Proteopedia

(Difference between revisions)
Jump to: navigation, search
Line 27: Line 27:
</noinclude>
</noinclude>
<includeonly>
<includeonly>
-
{{#vardefine:myname|{{{Name}}} }}
 
<jmol>
<jmol>
<jmolCheckbox>
<jmolCheckbox>
Line 39: Line 38:
Troubleshooting:
Troubleshooting:
- 
-
Name is: {{#var:myname}}
 
- 
-
First parameter: {{{1}}}
 
- 
-
Second parameter: {{{2}}}}
 
- 
-
Third parameter: {{{3}}}
 
Named parameter Name: {{{Name}}}
Named parameter Name: {{{Name}}}
Named parameter Selection: {{{Selection}}}
Named parameter Selection: {{{Selection}}}

Revision as of 16:14, 29 August 2018

This template is to make a checkbox that hides an object of a scene when unchecked, and displays them again when checked. The checkbox is checked by default, so it makes sense if the object is visible in the scene. To use the template, include the following in your Proteopedia text:

{{Checkbox hide unhide|Name="ATP molecule"|Selection="ATP"}}

In that spot, a checkbox will appear.

Under the hood, the following Wikimedia/Jmol script is inserted:

<jmol>
  <jmolCheckbox>
    <scriptWhenChecked>display displayed or {{{Selection}}}</scriptWhenChecked>
    <scriptWhenUnchecked>hide {{{Selection}}} or hidden</scriptWhenUnchecked>
    <checked>true</checked> 
    <text>{{{Selection}}}</text>
  </jmolCheckbox>
</jmol>


Troubleshooting:

Named parameter Name: {{{Name}}}

Named parameter Selection: {{{Selection}}}

Proteopedia Page Contributors and Editors (what is this?)

Karsten Theis, Angel Herraez

Personal tools