daily pastebin goal
60%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <aura:component controller="PageLayoutRecordDisplayController" implements="flexipage:availableForAllPageTypes">
  2.     <aura:attribute name="PageLayoutName" type="String" />
  3.     <aura:attribute name="RecordId" type="String" />
  4.  
  5.     <aura:attribute name="PageLayout" type="Object" access="private" />
  6.  
  7.     <aura:handler name="init" value="{!this}" action="{!c.init}" />
  8.  
  9.     <div class="slds-box slds-theme_default">
  10.     <aura:if isTrue="{! v.RecordId }">
  11.     <lightning:recordViewForm recordId="{! v.RecordId }">
  12.         <aura:iteration items="{! v.PageLayout.Sections }" var="section">
  13.             <c:CollapsibleSection title="{! section.Label }">
  14.                 <div class="slds-grid slds-gutters">
  15.                     <aura:iteration items="{! section.Columns }" var="column">
  16.                         <div class="slds-col">
  17.                             <aura:iteration items="{! column.Fields }" var="field">
  18.                                 <lightning:outputField fieldName="{! field.APIName }" />
  19.                             </aura:iteration>
  20.                         </div>
  21.                     </aura:iteration>
  22.                 </div>
  23.             </c:CollapsibleSection>
  24.         </aura:iteration>
  25.     </lightning:recordViewForm>
  26.     </aura:if>
  27.     </div>
  28. </aura:component>
RAW Paste Data
Top