Difference between revisions of "Template:PDF"

From AYSO Wiki
(Test with wiki filepath)
(Update Template with example from MediaWiki Widgets)
Line 6: Line 6:
 
     "description": "Embedded a PDF",
 
     "description": "Embedded a PDF",
 
     "params": {
 
     "params": {
         "wiki": {
+
         "name": {
 
             "label": "PDF File",
 
             "label": "PDF File",
 
             "type": "wiki-file-name",
 
             "type": "wiki-file-name",
Line 12: Line 12:
 
             "description": "Link to PDF"
 
             "description": "Link to PDF"
 
         },
 
         },
         "pdfurl": {
+
         "url": {
 
             "label": "PDF URL",
 
             "label": "PDF URL",
 
             "type": "url",
 
             "type": "url",
Line 23: Line 23:
 
</noinclude><includeonly>
 
</noinclude><includeonly>
 
{{#widget:PDF
 
{{#widget:PDF
|url={{filepath:File:{{{wiki}}}}}#toolbar=0
+
|url={{#if: {{{url|}}} |{{{url|}}} |{{filepath: {{{name|}}} }} }}
}}</includeonly>
+
|width={{{width|750}}}
 +
|height={{{height|1050}}}
 +
}}
 +
</includeonly>

Revision as of 07:12, 28 March 2024

This is a Template for embedding PDFs.

Embedded a PDF

Template parameters

ParameterDescriptionTypeStatus
PDF Filename

Link to PDF

Fileoptional
PDF URLurl

Link to PDF

URLoptional