rejetto forum

Software => HFS ~ HTTP File Server => HTML & templates => Topic started by: skb on February 22, 2015, 11:23:43 PM

Title: %comment% in ~files.lst ?
Post by: skb on February 22, 2015, 11:23:43 PM
I'm thinking this is by design rather than a bug, but wanted to check: It does not seem that the %comment% tag provides any output to the basic text "~files.lst" page.

I have a simple hfs.filelist.tpl that for files that currently does just: 
Code: [Select]
%files%

[files]
%list%

[file]
%item-name% %item-modified% %item-size-b%

[folder]


This has been working as expected.

Today, I added "%comment%" after my %item-size-b% entry, restarted HFS, and got no change in output.

I've searched the forum for %comment%, and see that there's a long history of adding support for complex HTML and multiline output. My guess is that this makes it impossible to use comments in the text output for ~files.lst  .

But, just to confirm, is there any way to get say, just the bare first line of a comment into the text-only output?

Thanks,
Steve
Title: Re: %comment% in ~files.lst ?
Post by: rejetto on February 23, 2015, 12:00:11 AM
as stated in the documentation
"inserts HTML from section [comment] if a comment is available for the item, void otherwise".
It's old, legacy stuff.
But you can use %item-comment% instead.
I just added it to the documentation.
Title: Re: %comment% in ~files.lst ?
Post by: skb on February 23, 2015, 01:00:45 AM
Ah, thanks! (I didn't really get the section [comment] reference; was just thinking of the more obvious item comments).

Steve