After a bit of research into SC’s own sample lib, I’ve found there were a few ‘magic’ curly bracketed variables such as {NM_CSS_CAB} and {NM_CSS_FUN_CAB} already in existence. Proving a system that allows for such behaviour is already implemented. So, it would be nice to extend upon this a few handy bits and pieces. I propose adding the following variables.
[SIZE=14px]{SC_LIB_[B][ GRP | SYS | PRJ ][/B]_[B][ LIBNAME ][/B]}[/SIZE]
Example; {SC_LIB_PRJ_FOO} that would be resulting into a string like
"../_lib/libraries/prj/foo/" to include CSS/JS/IMG in the header without having
to hardcode paths that may or may not change in the near future of Scriptcase.
[SIZE=14px]<!-- SC_HEADER_CSS:[ [B][I]str relative path[/I][/B] ] -->
<!-- SC_HEADER_JS:[ [B][I]str relative path[/I][/B] ] -->[/SIZE]
Example; <!-- SC_HEADER_CSS:../_lib/libraries/prj/foo --> that would include
the CSS file into the ?ctual <head> section of the HTML file being sent to the
end-user's browser. Now, the CSS/JS scripts are being summoned somewhere
halfway the DOM and that leads to some pretty ugly behaviour during pageloads.
The HTML style commenting as variables is already happening for control apps,
so a system to respond to these variables is already included in SC.