hi,
if i dare, being really new to cmsms... i'm not shure it's always so good an idea as metada tag is supposed to contain meta (description and so on) and then, is expected to be above css and js files.
Then adding a peculiar js file or snippet above a general js file (let's say mootools at random

) included in all the template files for example could result in js error if the concerned script depends on that general js file, what is quite often tne case.
something a bit more handy, imho once again, would be to create a user tag that relying on the page alias for example, would check the existence of a js file wearing the same name (i.e pagealias.js) and if so would return a an
echo '';
this tag, placed under the general js file, say, just above would do it's job when necessary, allowing to have as many different js files as there are pages if needed
have swing
a little edition

as you may say that it's easy to say but...

here is a solution, among others
this assumes
- that you've given an alias to all your pages
- you've put your js files inside a js directory in your website root directory (change that as you want of course)
create a user custom tag you'll call "pagejs" for example and put this inside
Code: Select all
global $gCms;
$pageAlias = $gCms->variables['page_name'];
if (file_exists("./js/$pageAlias.js")) {
echo "<__script__ type=\"text/javascript\" src=\"/js/$pageAlias.js\"></__script>\n";
}
save it and now, if you add {pagejs} just above your tag it will look for a js file wearing the same name as your page alias and link to it if it exists
hope it will help
have swing