Help:Displaying files

From semantic-mediawiki.org
Semantic extension(s): Page Forms
Further extension(s):  -/-
Keyword(s): file management · file upload

Description:

This tip helps you to display files on a page using a template corresponding to a form. Prerequisite is that you have the extension ParserFunctions installed on your wiki. There are three variants:

1) In case you did not upload a file with a form you want nothing to be displayed. In case you uploaded a file you would like to see a direct link to the file:

{{#if: {{{fileproperty|}}} | [[Media:{{{fileproperty|}}}|{{{fileproperty|}}}]] }}

2) In case you did not upload a file with a form you want nothing to be displayed. In case you uploaded a file you would like to see a direct link to the page containing the file:

{{#if: {{{fileproperty|}}} | [[:File:{{{fileproperty|}}}|{{{fileproperty|}}}]] }}

3) In case you did not upload a file with a form you want nothing to be displayed. In case you uploaded a file you would like to see the file displayed on the page directly:

{{#if: {{{fileproperty|}}} | [[File:{{{fileproperty|}}}|{{{fileproperty|}}}]] }}