Guest User

Untitled

a guest
Jul 15th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. <apex:page showHeader="true" showSidebar="true">
  2. <apex:include page="LEXPAGENAME"/>
  3. </apex:page>
  4.  
  5. function isLightningExperienceOrSalesforce1() {
  6. return((typeof sforce != 'undefined') && sforce && (!!sforce.one));
  7. }
  8.  
  9. if( isLightningExperienceOrSalesforce1() ) {
  10. // Do something for Lightning Experience
  11. }
  12. else {
  13. // Use classic Visualforce
  14. }
  15.  
  16. <apex:variable value="{!CONTAINS($CurrentPage.URL, 'lightning.force.com')}" var="isLightningMode"/>
  17. $CurrentPage.URL = {!$CurrentPage.URL} <br/>
  18. isLightningMode = {!isLightningMode} <br/>
  19. <apex:outputpanel layout="none" rendered="{!isLightningMode = false}">
  20. <!-- Classic UI - Code to display ui in Classic UI mode -->
  21. this is classic ui
  22. </apex:outputpanel>
  23.  
  24. <apex:outputpanel layout="none" rendered="{!isLightningMode = true}">
  25. <!-- Lightning mode - Code to display ui in Lightning mode -->
  26. this is Lightning mode
  27. </apex:outputpanel>
Add Comment
Please, Sign In to add comment