Is there any way in a template to see if a particular file exists?
Some products in my site have specific stylesheets, and rather than have a different template for products with and without custom stylesheets, I'd like to have something in the template's "add to <head>" like:
&lt;link rel="stylesheet" type="text/css" href="/css/products/&lt;%=getCurrentAttribute('item','itemid')%&gt;.css"&gt;...but of course, if there is no stylesheet, I don't want to refer to it and generate a 404 error every time someone views such a product.So ideally, I could (pseudo-code, and please excuse the nested <% %> -- it's just there to make the point):&lt;%if exists "/css/products/&lt;%=getCurrentAttribute('item','itemid')%&gt;.css"%&gt; &lt;link rel="stylesheet" type="text/css" href="/css/products/&lt;%=getCurrentAttribute('item','itemid')%&gt;.css"&gt; &lt;%endif%&gt;I'm assuming this is way outside of what NetSuite has in the template system. If that's true, then does anyone else think this would be a useful feature?Now, of course, as I said, I could have two different templates - one for products with custom stylesheets, and one for products without custom stylesheets. But then I have to edit two templates every time I make a change. And that's just sad...