Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
file exists?
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):
0