At first I wished to count the number of links (%nb-links%) in recursive mode (missing in hfs) by means of %sequential% by using this way
[MAIN SECTION]
.
.
%files%
<script>
document.write(eval("%sequential%"-1));
</script>
[link]
<!-- %sequential% --> // masqued in web page
<TR> .....
not easy ..
I propose this modification to rejetto to include at main.pas
procedure applySequential();
const
PATTERN = '%sequential%';
NBPATERN = '%nb-sequential%'; // total of %sequential%
var
idx, p: integer;
idxS: string;
begin
idx:=0;
repeat
p:=pos(PATTERN, result);
if p = 0 then exit;
inc(idx);
idxS:=intToStr(idx);
delete(result, p, length(PATTERN)-length(idxS));
move(idxS[1], result[p], length(idxS));
until false;
idxS:=intToStr(idx); // necessary for second repeat until
repeat
p:=pos(NBPATTERN, result); // search all %nb-sequential%
if p = 0 then exit;
delete(result, p, length(NBPATTERN)-length(idxS));
move(idxS[1], result[p], length(idxS)); //replace any where in folder page
until false;
end; // applySequential
%sequential% works as before 1,2,3, .... N and after all %nb-sequential% are substitute with the value N where we find it in the web page
thanks