Should be the same as in item details, that's how I used it anyway in my example.
'Artist:'$tab()$if2(%artist%,' N/A')$crlf()
'Album:'$tab()$if2(%album%,' N/A')$crlf()
'Title:'$tab()$if2(%title%,' N/A')$crlf()
'Track:'$tab()$if2(%tracknumber%'/'%totaltracks%,' N/A')$crlf()
'Disc:'$tab()$if2(%discnumber%'/'%totaldiscs% ,$if($strcmp($left(%path%,7),'http://'),' N/A',' 1/1'))$crlf()
'Date:'$tab()$if2(%date%,' N/A')$crlf()
'Genre:'$tab()$if2(%genre%,' N/A')$crlf()
'Style:'$tab()$if2(%style%,' N/A')$crlf()
'Rating:'$tab()$if(%rating%,$repeat($char(9733),%rating%)$repeat($char(9734),$sub(5,%rating%)),$repeat($char(9734),5))' Mood: '$ifgreater(%mood%,0,$char(9829),$char(9825))$crlf()$crlf()
'Codec:'$tab()$tab()$if2(%codec%[ %codec_profile%][ $if(%__tool%,$replace(%__tool%,LAME,'Lame '),%__tool%)],' N/A')$crlf()
'Bitrate:'$tab()$tab()$if2(%bitrate%' Kbit/s',' N/A')$crlf()
'Sample Rate:'$tab()$if2(%samplerate%' Hz',' N/A')$crlf()
'Channels:'$tab()$if2($caps(%__mp3_stereo_mode%),' N/A')$crlf()
'Size:'$tab()$tab()$if2($div(%_filesize%,1048576)'.'$num($muldiv($mod(%_filesize%,1048576),100,1048576),2)' MB',' N/A')$crlf()
'Album Gain:'$tab()$if2(%replaygain_album_gain%,' N/A')$crlf()
'Track Gain:'$tab()$if2(%replaygain_track_gain%,' N/A')$crlf()
$crlf()
'Play Count:'$tab()$if2(%play_count%,' N/A')$crlf()
'Added:'$tab()$tab()$if2(%added%,' N/A')$crlf()
'First Played:'$tab()$if2(%first_played%,' N/A')$crlf()
'Last Played:'$tab()$if2(%last_played%,' N/A')$crlf()
$crlf()
['Comment:'$crlf()%comment%$crlf()$crlf()]
['Release Notes:'$crlf()%DISCOGS_RELEASE_NOTES%$crlf()$crlf()]
['Release Credits:'$crlf()%DISCOGS_RELEASE_CREDITS%$crlf()$crlf()]
['Track Credits:'$crlf()%DISCOGS_TRACK_CREDITS%$crlf()$crlf()]
['Track Credits Vocals:'$crlf()%DISCOGS_CREDIT_VOCALS%$crlf()$crlf()]
['Remix Credit:'$crlf()%REMIXED BY%$crlf()$crlf()]
['URL:'$crlf()[%DISCOGS_ARTIST_URLS%$crlf()][%www%]$crlf()$crlf()]
Can't get $textfile() to work though, maybe that's only with foo_func?