You need to sign in to do that
Don't have an account?
Praneeth Indraganti
Visualforce Page with Lightning design in Napili template Limitation
Hi All,
We have the following scenario.
We want to have classic pages look like lightning in Napili Template
1. In our approach we added an attribute called lightningstylesheets=true for visualforce page with a hope that the page will be automatically rendered with lightning styles in community, there comes a road block with Salesforce -
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/vf_dev_best_practices_slds_lightningstylesheets.htm
We cannot use lightningstylesheets attribute in community
2. So as a work around we created a lightning app with the Visualforce embedded in it.
<aura:component implements="forceCommunity:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,lightning:actionOverride,forceCommunity:availableForAllPageTypes">
<iframe src="https://xxxxx/apex/viewOrder?id=8011F0000009IbO" style="height:800px;width:1000px"/>
</aura:component>
After doing this we tried overriding the Standard View functionality of Salesforce
Even though we have given the SampleComponent as the override in Lightning Experience it is not working.
3. Apart from the limitation we faced in point.2 there is also a limitation in passing parameters via url within community.
Below is the link of Salesforce Idea
https://success.salesforce.com/ideaView?id=0873A000000CLheQAG
Please suggest what is the best way to implement this.
We have the following scenario.
We want to have classic pages look like lightning in Napili Template
1. In our approach we added an attribute called lightningstylesheets=true for visualforce page with a hope that the page will be automatically rendered with lightning styles in community, there comes a road block with Salesforce -
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/vf_dev_best_practices_slds_lightningstylesheets.htm
We cannot use lightningstylesheets attribute in community
2. So as a work around we created a lightning app with the Visualforce embedded in it.
<aura:component implements="forceCommunity:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,lightning:actionOverride,forceCommunity:availableForAllPageTypes">
<iframe src="https://xxxxx/apex/viewOrder?id=8011F0000009IbO" style="height:800px;width:1000px"/>
</aura:component>
After doing this we tried overriding the Standard View functionality of Salesforce
Even though we have given the SampleComponent as the override in Lightning Experience it is not working.
3. Apart from the limitation we faced in point.2 there is also a limitation in passing parameters via url within community.
Below is the link of Salesforce Idea
https://success.salesforce.com/ideaView?id=0873A000000CLheQAG
Please suggest what is the best way to implement this.
Did you try "Lightning for visualforce" meaning including your lightning application in visualforce?
Check this https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_visualforce.htm
**Please mark this as best answer if this answers your query.**
Thanks,
Manish Choudhari
14x Certified Salesforce Architect
Certification link:http://certification.salesforce.com/certification-detail-print?conId=003G000002gRrrEIAS
My Blog: http://sfdcfacts.com/
Youtube Channel: https://www.youtube.com/SFDCFacts
LinkedIn: https://www.linkedin.com/in/manish-choudhary/
Trailhead: https://trailhead.salesforce.com/en/me/manish-choudhari
Twitter: https://mobile.twitter.com/manish_sfdc