3

I have included the html page and its css content in static resource and I am trying to reference the html content in visualforce page.HTML file will be used as header and footer for all of my visualforce pages.So is the reason to include it in static resource.But the nothing is displaying on visualforce page.Someone please help me.

<apex:stylesheet value="{!URLFOR($Resource.assests, 'css/bootstrap.min.css')}"/>
<apex:stylesheet value="{!URLFOR($Resource.assests, 'css/font-awesome.min.css')}"/>
<apex:stylesheet value="{!URLFOR($Resource.assests, 'css/datepicker.css')}"/>
<apex:stylesheet value="{!URLFOR($Resource.assests, 'css/bootstrap-timepicker.min.css')}"/>
<apex:stylesheet value="{!URLFOR($Resource.assests, 'css/common.css')}"/>    
<apex:iframe src="{!URLFOR($Resource.assests,'home.php-.html')}"/>

4

If you want to reuse your html for headers and footer, you should look into the component and composition VF tags. These will allow you to make Vf template pages, which I would think would be easier than trying to keep your html in static resources.

http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_component.htm

http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_composition.htm

Force.com Sites Page to template to component relationship

3

Have you made your static resource as public ?

There are two things i check for these issues

1)The path of the CSS file and the url i use in code

2) Making static resource public .

0

Yes, If you are using VF Page in Sites.com, make all the Static Resources PUBLIC. If you are using VF Page within Salesforce.com, then it can be PUBLIC/ PRIVATE.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.