Mars:
You have expanded a little the code i put as example, but you didn't answer to the important point of the question ! I wonder if i should use in the same way
bacter mars, you must read all line from begin to end in my posts Huh? here I repeat twice same things
So, if you are saying that your example code works, this means that with alias the expression is evaluated when the macro is defined, e.g the macro will hold the value of the expression.
{{ alias | name | expression } :
so if expression is %item-dl-count% , name will hold the value of %item-dl-count%
So far, that's very good. That implies ve have variables!
But here arises the big problem:
{{ alias | alias-name | {{macro defined to be an alias}} }}
example:
if i define this alias in the files section before list:
{{ alias | isimage | {{ if |=|{{cut(-3|3|%item-name%}}||img | This is a disk image|}}}}and then try tu use it in the file section:
[file]
<tr><td>%new% <a href="%item-url%"><img src="/~img_file" /> %item-name%</a>%comment%{{isimage}}<td align=right>%item-size%<td align=right>%item-modified%<td align=right>%item-dl-count%
what would happen?
If your first example (the maxhit code) works because the value of expression is evaluated ad assigned to the alias, i think the second example can't work, because when the expession is evaluated, %item-name% is not already defined and evaluation should produce an error!
Is there something i missed to understand or could you explain what would be the behaviour of alias with expression?
alias assigns expression or value of expression to alias-name?
Thanks