Difference between revisions of "Template:MakeRef"

From Wikispooks
Jump to navigation Jump to search
(Trim duplicate name)
Line 8: Line 8:
 
     Make a unique ref, and name it "ref_name" if that param is also given
 
     Make a unique ref, and name it "ref_name" if that param is also given
  
--> {{{source_URL|}}}{{{source_name|}}}{{{source_details|}}}|{{#tag:ref|{{#if: {{{source_URL|}}}|{{#if: {{{source_name|}}}|[{{{source_URL|}}} {{{source_name|}}}]|{{{source_URL|}}}}}|{{LinkIfExists|{{{source_name|}}}}}}}{{{source_name}}}{{{source_details|}}}|name={{MakeRef/Name|ref_name={{{ref_name|}}}|source_name={{{source_name|}}}|source_URL={{{source_URL|}}}|source_details={{{source_details|}}}}}}}|<!--
+
--> {{{source_URL|}}}{{{source_name|}}}{{{source_details|}}}|{{#tag:ref|{{#if: {{{source_URL|}}}|{{#if: {{{source_name|}}}|[{{{source_URL|}}} {{{source_name|}}}]|{{{source_URL|}}}}}|{{LinkIfExists|{{{source_name|}}}}}}} {{{source_details|}}}|name={{MakeRef/Name|ref_name={{{ref_name|}}}|source_name={{{source_name|}}}|source_URL={{{source_URL|}}}|source_details={{{source_details|}}}}}}}|<!--
  
 
-->{{#if: {{{ref_name|}}}|<!--
 
-->{{#if: {{{ref_name|}}}|<!--

Revision as of 06:21, 16 February 2019

This is used by Template:SMWQ. It uses Template:MakeRef/Name. It makes a reference out of the following params, at least one of which is required:

  • ref_name (only useful if the page featured multiple references from this source)
  • source_name (recommended) - If this is a page name, it will link to that page
  • source_URL (recommended)
  • source_details (optional) - Use for extra details, e.g. p.95