Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Javascript include in Fixed Layouts
Ams_devnet
Hi All,
Does anyone know if there is a way to include a Javascript for a particular layout(fixed Layout)?
Basically I want that any page that uses this layout(example Product detail Layout) automatically includes a Javascript file.
Regards,
Amrish
Find more posts tagged with
Comments
Rick Poulin
Your XSL (and external classes) have access to this information, so it should be reasonably easy to build. Exactly how depends on requirements you haven't mentioned.
Ams_devnet
Thanks for the prompt reply Rick
My requirement is what we have Site Level Javascript include or page level include. Similarly if I am able to write a <script> tag in Fixed Layout file. The benefit of such a solution would be that all pages using this Layout will have the JS included and hence I can have some common JS Functions, for that Layout type, included in all the pages using this Layout.
What you suggested sound great but I am wondering this would mean I need to include a common XSL/Externals in all the pages which checks for Layout and then include a JS file for the page which is a lengthier procedure.
GRD
You can do this by modifying fixed-layout.page.xsl and case-out (xsl:choose) your fixed-layout template names.
-Greg