Displays the contents of a txt based file, for example html,css,txt, directly on a wiki page.
You can verify that the formatter is working by
opening this test page.
Administrators
No special actions required.
Markup Usage
What can you do?
- Display the content of a file(s) in a wiki page
- Text based files can be displayed
- PDF Files can be displayed
- Video can be displayed (Embedded in WMP only)
- The following files will be attempted to be played by WMP:
- .aif, .aifc, .aiff, .asf , .asx, .au, .avi, .cda, .dvr-ms, .ivf, .m1v, .m3u, .mid, .midi, .mov,
- .mp2, .mp3, .mpa, .mpe, .mpeg, .mpg, .mpv2, .qt, .rmi, .snd, .vob, .wav, .wax, .wm, .wma, .wms,
- .wmv, .wmx, .wmz, .wpl, .wvx
- The raw content of a file can be displayed
- Embed the display file in a box with specified size (height/width)
- Specify which provider to retrieve the file from
Usage:
{ FileCont file=XXX prov=YYY height=ZYX width=XYZ raw=ZZZ rows=XXY cols=YYX }
Where:
- file - A valid path and file wildcard, must be encapsulated in ' '
- prov - Fullname as seen in the wiki File management, ex. 'Local Files Provider' and 'SQL Server Files Storage Provider'
- height - Height of the box to display the file inside
- If used with raw=true remember to add unit, ex. px or %
- width - Width of the box to display the file inside
- If used with raw=true remember to add unit, ex. px or %
- raw - True or false, will display the raw content of a file.
- RAW SHOULD ALWAYS BE USED WITH CAUTION, USE ONLY ON SMALL FILES
- rows - Applies only when using raw=true, can be used instead of height to set the number of rows to display
- cols - Applies only when using raw=true, can be used instead of width to set the number of cols to display
All args which have a value that contains whitespaces, must be encapsulated in ' ', ex. '/Folder name with spaces/File.txt'.
There's no guarantee that your file can be displayed, it depends on the browser used, plugins installed, server etc.. However basic Text files and standard wide spread video/pdf file types should work in most browsers.
It may require a couple of attempts find the right way of displaying your file, remember that there are
< nowiki > and
< nobr > tags which might help you get the right result.
Display a file inside a box
Markup:
{ FileCont file='/Keeper.Garrett.Formatters/Tables/*.html' width=500 height=200}
Result:
(No directory found matching "/Keeper.Garrett.Formatters/Tables/".)
Display a file inside a box using a different provider
Markup:
{ FileCont file='/Keeper.Garrett.Formatters/Tables/*.html' prov='Local Files Provider' width=500 height=200 }
Result:
(No directory found matching "/Keeper.Garrett.Formatters/Tables/".)
Display the code of a html page in a box
Markup:
{ FileCont file='/Keeper.Garrett.Formatters/Tables/*.html' prov='Local Files Provider' raw=true rows=12 cols=80 }
Result:
(No directory found matching "/Keeper.Garrett.Formatters/Tables/".)
Display a file
Markup:
{ FileCont file='/Keeper.Garrett.Formatters/Tables/*.html' }
Result:
(No directory found matching "/Keeper.Garrett.Formatters/Tables/".)
Using tags to display the entire code of a html page
Markup:
@ @ { FileCont file='/Keeper.Garrett.Formatters/Tables/*.html' prov='Local Files Provider' raw=true } @ @
Result:
(No directory found matching "/Keeper.Garrett.Formatters/Tables/".)
Without tags, displaying an entire html page
Markup:
{ FileCont file='/Keeper.Garrett.Formatters/Tables/*.html' prov='Local Files Provider' raw=true }
Result:
(No directory found matching "/Keeper.Garrett.Formatters/Tables/".)