Including Static Files Within A Custom Component
January 5, 2011
Recently a forum post came up asking how to include files along with a custom component. This is a fairly simple process.
You need not checkin the files to content server. Instead, put the files you want to include with your component here:
server/weblayout/resources/MyComponentName/
Then in Component Wizard -> Build Settings, add a “Weblayout” entry type and link to the above path.
To use your content, you can use the following Idoc Script code to include a JavaScript file:
<script type="text/JavaScript" src="<$HttpRelativeWebRoot$>resources/MyComponentName/jquery.js"></script>
And that’s it! It is that simple. Included files can be anything ranging from JavaScript (think jQuery) to images to CSS.
Advertisement
Categories: OracleUCM