Template:Dropdown header2: Difference between revisions

From FamilySearch Wiki
No edit summary
No edit summary
 
Line 2: Line 2:
<!-- The following code is designed to eliminate duplicate naming of dropdown headings, since duplicate headings means that when one heading is clicked, all dropdown headings with the same title will open.  An example would be having a title like '1800-1900' under a dropdown of Birth, Marriage and Death.  When '1800-1900' is selected, all three areas will open up, even though they may still be hidden in the different dropdown areas.  In order to fix this, the 'Previous dropdown title', such as 'Birth', 'Marriage', or 'Death', should be added to the Dropdown call of each '1800-1900' section in order to avoid this issue. -->
<!-- The following code is designed to eliminate duplicate naming of dropdown headings, since duplicate headings means that when one heading is clicked, all dropdown headings with the same title will open.  An example would be having a title like '1800-1900' under a dropdown of Birth, Marriage and Death.  When '1800-1900' is selected, all three areas will open up, even though they may still be hidden in the different dropdown areas.  In order to fix this, the 'Previous dropdown title', such as 'Birth', 'Marriage', or 'Death', should be added to the Dropdown call of each '1800-1900' section in order to avoid this issue. -->
{{#if: {{{Dropdown title|}}}|{{#if:{{{Previous dropdown title|}}}
{{#if: {{{Dropdown title|}}}|{{#if:{{{Previous dropdown title|}}}
|<span class="mw-customtoggle-{{#replace:{{{Previous dropdown title|}}}| |_}}_{{#replace:{{{Dropdown title|}}}| |_}}" style="font-size:15px !important; color:#0B0BEC !important; text-decoration:underline !important; display:inline-blue; font-weight:bold;">{{{Dropdown title|}}}</span>
|<span class="mw-customtoggle-{{#replace:{{{Previous dropdown title|}}}| |_}}_{{#replace:{{{Dropdown title|}}}| |_}}" style="font-size:17px !important; color:#0B0BEC !important; text-decoration:underline !important; display:inline-blue; font-weight:bold;">{{{Dropdown title|}}}</span>
<div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-{{#replace:{{{Previous dropdown title|}}}| |_}}_{{#replace:{{{Dropdown title|}}}| |_}}" style="height:auto; width=50%;">
<div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-{{#replace:{{{Previous dropdown title|}}}| |_}}_{{#replace:{{{Dropdown title|}}}| |_}}" style="height:auto; width=50%;">
<span class="mw-customtoggle-{{#replace:{{{Previous dropdown title|}}}| |_}}_{{#replace:{{{Dropdown title|}}}| |_}}" style="color:#0B0BEC  !important;font-size:small !important;float:left !important;">[hide]</span>
<span class="mw-customtoggle-{{#replace:{{{Previous dropdown title|}}}| |_}}_{{#replace:{{{Dropdown title|}}}| |_}}" style="color:#0B0BEC  !important;font-size:small !important;float:left !important;">[hide]</span>
|<span class="mw-customtoggle-{{#replace:{{{Dropdown title|}}}| |_}}" style="font-size:15px !important; color:#0B0BEC !important; text-decoration:underline !important; display:inline-blue; font-weight:bold;">{{{Dropdown title|}}}</span>
|<span class="mw-customtoggle-{{#replace:{{{Dropdown title|}}}| |_}}" style="font-size:17px !important; color:#0B0BEC !important; text-decoration:underline !important; display:inline-blue; font-weight:bold;">{{{Dropdown title|}}}</span>
<div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-{{#replace:{{{Dropdown title|}}}| |_}}" style="height:auto;">
<div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-{{#replace:{{{Dropdown title|}}}| |_}}" style="height:auto;">
<p><span class="mw-customtoggle-{{#replace:{{{Dropdown title|}}}| |_}}" style="color:#0B0BEC  !important;font-size:small  !important;float:left;">[hide]</span></p>|}}<!--<br/>-->
<p><span class="mw-customtoggle-{{#replace:{{{Dropdown title|}}}| |_}}" style="color:#0B0BEC  !important;font-size:small  !important;float:left;">[hide]</span></p>|}}<!--<br/>-->

Latest revision as of 15:15, 5 January 2023

Usage

This template is used to create a hidden dropdown area that becomes visible after the user selects a keyword on the page. The most important thing to remember is that every time this template is used, make sure to also close the dropdown area by adding a call to {{Dropdown end}}.

{{Dropdown|
  Dropdown title=Birth|
  Dropdown text style=|}}

<!-- add code here that will be 'hidden' in the dropdown area -->

{{Dropdown end}}  <!-- call {{Dropdown end}} in order to close the dropdown area-->