You need to sign in to do that
Don't have an account?
JimPDX
Sites Include Structures
I am trying to move an older site (table-based) with a heavy include structure (php) into my developer org as VF pages and later a full Site implementation. I am using a combination of static resources for structural images and starting to utilize VF components for the larger blocks of code such as a tradition header include, navigation include and footer. Each of these needs to be dynamic which won't be a problem with APEX, although I seem to be unable to reference Static Resources from within other resource files such as CSS and JavaScript. Obviously I don't want to hard-code image paths into CSS url attributes. Am I missing an obvious workaround to include dynamic references within other static resources?
That was not even the main question I intended to post... In creating my larger includes, I have begun getting save errors on open tags, such as a container table (did I mention this was a site from 2000?) or the BODY tag itself. Is there a way to use APEX tags in VisualForce to open the body element without it causing compile errors?
Appreciate any advice folks may have.
That was not even the main question I intended to post... In creating my larger includes, I have begun getting save errors on open tags, such as a container table (did I mention this was a site from 2000?) or the BODY tag itself. Is there a way to use APEX tags in VisualForce to open the body element without it causing compile errors?
Appreciate any advice folks may have.
If a CSS file contains relative references to images then the pattern to follow is a structured archive static resource, i.e. a Zip file.
Imagine on your local filesystem you have a file called styles.css and in that stylesheet you have a reference like this:
table { background-image: img/testimage.gif }
and on your local filesystem there a folder named "img" containing an image named "testimage.gif" and that folder is physically located in the same place as styles.css.
Now zip up the contents of the location containing styles.css and the img folder, upload it as a static resource named "styles" and then in your page do this:
<apex:stylesheet value="{!$Resource.styles}"/>
Message Edited by Bulent on 12-16-2008 02:52 PM
You can use use static resource for your javascript and if you include your javascript as part of the zip file (static resource) you can directly reference images in the zip file with the file names and the folder hierarchy
if you want to include the javascript directly in your visualforce page then your example should work. First option is better.
If I include lightbox.js in the ZIP file along with images/closebox.gif, could I also use the following in my APEX page or component:
Jim,
Were you able to resolve this? I am having the same issue.
thanks,
Shamil