This content has been marked as final. Show 3 replies
Not sure about your chosen solution for this problem, however, you can refer directly to static files in code. Generally speaking, you refer to images but other file types will also work:
So, you upload your chosen file to the 'static files' section of the application editor (refer to the documentation for help on this).
Once the file is in, you can refer to it in code using the +#WORKSPACE_IMAGES#+ substitution string e.g.:
Thereafter, you could refer to it in an html region like so:
(You can also alternate this with the +&WORKSPACE_IMAGES.+ equivalent in certain circumstances)
<a href="#WORKSPACE_IMAGES#mygroovyfile.txt">download my file</a>
Basically my problem is, i am trying to keep the look and feel of my page same as some standard pages and for that i have got the js and css files which i need to make use of.
So to get that look and feel in my page(Say i need some particular links,text in header region and something else in footer region), i have created header and footer region.
In those region's sources, i am trying to write html code which will refer those standard js and css file and render the same look.
But probelm is: the html code is much bigger in size and apex is not taking that, so instead i wanted to keep the html code in a .html static file and refer that in the region source.
I tried whatever you have suggested, but it failed. I am not understanding where should i write #WORKSPACE_IMAGES#mygroovyfile.txt ??
Is region source the only place where i should write #WORKSPACE_IMAGES#mygroovyfile.txt
I tried this, but its not working
Can you help me further with this ?
Sorry, I think I've made a mistake - you should use the alternative '&' notation inside html:
It sounds to me like you want to amend the page template, rather than the individual pages themselves. If you go into the 'Shared Components' section of your application and click on the 'templates' link, you will be presented with the various templates used in your application. You are mainly interested in the Page Templates here.
I would recommend making a copy of the relevant page template you want to base your new work on, just in case you make an error and want to go back to the old format. Make the appropriate amendments - I would refer to the current templates to see how they refer to static CSS and js files, although the code you'll write will probably follow the basic formula laid out below e.g:
Once you are happy with the changes, just refer your new template in the page (or even change your default page template accordingly) and try the page again.