FilepublishFileIcon
Version: - stringSummary
Returns the icon for the current file/folder.
Settings
The icon selected is based on the file extension and the Icon folder input field in the Display section for the paragraph module.
(Page > Paragraph > Module tab > Display panel > Icon folder)
Remarks
The value is returned as a HTML code snippet containing an <img>
tag.
Icons should be named extension.gif, e.g. doc.gif.
If no icon is available for the extension the default icon na.gif is displayed.
Examples
Outputting the template tag
@GetString("FilepublishFileIcon")
Check if tag has a value
@if(!string.IsNullOrWhiteSpace(GetString("FilepublishFileIcon"))) {
@* Tag has value, so let's do something useful here. *@
}
Assign tag to a value for later use
@{
string storedTag = GetString("FilepublishFileIcon");
}
Outputting the template tag
<!--@FilepublishFileIcon-->
Check if string has a value
<!--@If Defined(@FilepublishFileIcon)-->
Let's output this tag here: <strong><!--@FilepublishFileIcon--></strong>
<!--@EndIf(@FilepublishFileIcon)-->