Just one more idea.... Why not include the new @IfError...?
html:="";
@For(n := 1; n <= @Elements(RelatedArticles); n := n + 1;
html := html + @IfError( "<a href=\"/" + @WebDBName + "/0/" + RelatedArticles[ n ]+ "\">" + @GetDocField( RelatedArticles[ n ]; "Title") + "</a><br />" + @Newline )
);
Not sure it really gives us anything in readability, but saves a couple of lines!
I added in the @Newline as I am sometimes fussy how my html code comes out ;-) It often helps me when dealing with fiddly and annoying display issues etc. Anyone else do that?
I haven't tried this to check it works, I was just playing with some of the new @Functions, as remembering to use them, versus the "good old methods" I find can be a problem!!
Just one more idea.... Why not include the new @IfError...?
html:="";
@For(n := 1; n <= @Elements(RelatedArticles); n := n + 1;
html := html + @IfError( "<a href=\"/" + @WebDBName + "/0/" + RelatedArticles[ n ]+ "\">" + @GetDocField( RelatedArticles[ n ]; "Title") + "</a><br />" + @Newline )
);
Not sure it really gives us anything in readability, but saves a couple of lines!
I added in the @Newline as I am sometimes fussy how my html code comes out ;-) It often helps me when dealing with fiddly and annoying display issues etc. Anyone else do that?
I haven't tried this to check it works, I was just playing with some of the new @Functions, as remembering to use them, versus the "good old methods" I find can be a problem!!