+ Start a Discussion
Deepak agarwal 9Deepak agarwal 9 

Requirement in Community Lightning

Hi Folks,
I have a requirement in which i am getting data dynamically from Salesforce objects to Community builder.I need help in arranging the data in 2 rows at a time.Presenlty i am getting data in this format.But here i need Zenovation center and ZENQMS in 1 row similarly i need again 2records in one row and so on.I am using SLDS here.
<div class="slds">  
        <div class="slds-container--center slds-container--small slds-container--medium">
              <aura:iteration items="{!v.ZenObjsnew}" var="zenobjsnew" aura:id="iter">     
            <div class="slds-grid slds-wrap">
                <div class="slds-size--12-of-12 slds-small-size--6-of-6 slds-medium-size--6-of-12 slds-large-size--6-of-12 blue-bg ">
                    <div class="slds-grid slds-wrap content-box">
                        <div class="slds-size--12-of-12 slds-medium-size--3-of-12">
                            <img src="{!v.imagepath1}" alt="{!v.imagetext1}"/>
                        <div class="slds-size--12-of-12 slds-medium-size--9-of-12">
                            <h4 class="liheading"> 
                                <a href="{!v.linkpath1}">
                            <p class="text-limit">{!v.linktext1}
                            <p class="language  spacer">Chinese 
                                        <a href="javascript:void(0)">????
                                        </a> | Korean 
                                        <a href="javascript:void(0)">???
                                        </a> | French 
                                        <a href="javascript:void(0)">Français
                                        </a> | Japanese 
                                        <a href="javascript:void(0)">???

User-added image

Here the data is bring bought from Apex controller in {!zenobjsnew.ZenLms_Name_del__c}.i am unable to understand how do i divide the data row wise with 2 records in 1 row.And the data is being iterated through <aura:iteration> tag and being displayed.

James LoghryJames Loghry
Deepak, I believe this is just a CSS issue that you're encountering. First off, take a look at the sizing page of the SLDS here: https://www.lightningdesignsystem.com/components/utilities/sizing/

In your CSS, you're using "slds-size--12-of-12" quite a bit.  If you change this to "slds-size--1-of-2" it *should* work.  Although, you might have to play around with the CSS a bit to get it exactly how you want.  When you're mucking with the CSS, try using your browser's DOM inspector and playing with the different CSS classes first to see how it looks.