Creating the 2 Columns Section
Version 0.5 BETA on the 1st post
The 2 columns section basically has 2 columns, 1 shows the image and on the right some text. When complete, this email should now display like this.
So again, we fire the abstract designer, create our layout for this section and then load the layout inside the section.
We will call this layout, section1 and then load it with
Code:
'load two columns
twocolumnsection.Element.LoadLayout("section1")
Our final code now looks like this..
Code:
Sub Init
'initialize the app
MJMLApp.Initialize
'load the main layout
BANano.LoadLayout("#template", "myemail")
'load the ch to
companyheader.Element.LoadLayout("ch")
'
'load the image header
imageheader.Element.LoadLayout("ih")
'
'load the intro text
introductiontext.Element.LoadLayout("introtext")
'
'load two columns
twocolumnsection.Element.LoadLayout("section1")
'save the email
MJMLApp.Save
End Sub
As you have noticed, we have not written much code here as we are doing everything via the abstract designer.
This is a list of our layouts so far..
The section1 layout is designed like this..
1. Drag and Drop a MJColumn to the layout, inside that column, drag and drop a MJImage.
Set the src of the image to
https://designspell.files.wordpress.com/2012/01/sciolino-paris-bw.jpg and the width to 200px.
2. Drag and drop another MJColumn to the layout to be side by side to the other. Add 2 MJTexts inside it. One will be a heading and another lorem ipsum. Remember how we did the lorem ipsum before, this also applies here.
The first MJText should have these attributes...
font-style="italic"
font-size="20px"
font-family="Helvetica Neue"
color="#626262" and the caption should be Find amazing places
The second MJText should have these attributes, LoremIpsum should be checked and the color should be #525252.
Save the layout and then load it to see your updates.
This is going very well!!!