Last active
September 14, 2018 19:45
-
-
Save lfreeland/ac5d584f9cf4599dcd63e031b8ecbc0d to your computer and use it in GitHub Desktop.
Page Layout Record Display Lightning Component Markup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <aura:component controller="PageLayoutRecordDisplayController" implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:hasSObjectName"> | |
| <aura:attribute name="PageLayoutName" type="String" /> | |
| <aura:attribute name="PageLayout" type="Object" access="private" /> | |
| <aura:handler name="init" value="{!this}" action="{!c.init}" /> | |
| <div class="slds-box slds-theme_default"> | |
| <aura:if isTrue="{! v.recordId }"> | |
| <lightning:recordViewForm recordId="{! v.recordId }" objectApiName="{! v.sObjectName }"> | |
| <aura:iteration items="{! v.PageLayout.Sections }" var="section"> | |
| <c:CollapsibleSection title="{! section.Label }"> | |
| <div class="slds-grid slds-gutters"> | |
| <aura:iteration items="{! section.Columns }" var="column"> | |
| <div class="slds-col"> | |
| <aura:iteration items="{! column.Fields }" var="field"> | |
| <lightning:outputField fieldName="{! field.APIName }" /> | |
| </aura:iteration> | |
| </div> | |
| </aura:iteration> | |
| </div> | |
| </c:CollapsibleSection> | |
| </aura:iteration> | |
| </lightning:recordViewForm> | |
| </aura:if> | |
| </div> | |
| </aura:component> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment