Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <apex:page showHeader="true" showSidebar="true">
- <apex:include page="LEXPAGENAME"/>
- </apex:page>
- function isLightningExperienceOrSalesforce1() {
- return((typeof sforce != 'undefined') && sforce && (!!sforce.one));
- }
- if( isLightningExperienceOrSalesforce1() ) {
- // Do something for Lightning Experience
- }
- else {
- // Use classic Visualforce
- }
- <apex:variable value="{!CONTAINS($CurrentPage.URL, 'lightning.force.com')}" var="isLightningMode"/>
- $CurrentPage.URL = {!$CurrentPage.URL} <br/>
- isLightningMode = {!isLightningMode} <br/>
- <apex:outputpanel layout="none" rendered="{!isLightningMode = false}">
- <!-- Classic UI - Code to display ui in Classic UI mode -->
- this is classic ui
- </apex:outputpanel>
- <apex:outputpanel layout="none" rendered="{!isLightningMode = true}">
- <!-- Lightning mode - Code to display ui in Lightning mode -->
- this is Lightning mode
- </apex:outputpanel>
Add Comment
Please, Sign In to add comment