-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmail_merge_basic_code.liquid
143 lines (98 loc) · 6.52 KB
/
mail_merge_basic_code.liquid
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!--
How would you like your people sorted? ('first_name', 'last_name')
{% assign sorted_people = people | sort: 'last_name' %}
How would you like your letter signed?
{% assign signature = 'Pastor Ron Hudson'%}
What Organization Logo do you want in your header?
{% assign org_logo = 'https://avatars.planningcenteronline.com/uploads/organization/35565-1346205702/avatar.4.png'%}
Do you want Organization Name in the header?
{% assign org_name = 'false'%}
Do you want Organization Logo in the header?
{% assign org_hlogo = 'false'%}
Do you want Organization Logo in the footer?
{% assign org_flogo = 'true'%}
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
{{ helpers.bootstrap_3 }}
<!-- This report is styled using the Bootstrap framework. http://getbootstrap.com/css/
If you'd rather provide your own styles, add them to the style section below. -->
<style>
.person { page-break-inside: avoid; page-break-after: always;}
img.org-logo {height: 70px;}
</style>
</head>
<!-- This is what makes the "Print to PDF" link at the top" -->
<body>
<div class="hidden-print">
<div class="alert alert-warning hidden-print" role="alert">
<a href="https://people.planningcenteronline.com/reports/{{ report.id }}.pdf?list_id={{list.id}}" class="alert-link">Print to PDF</a>
</div>
</div>
<!-- This container is what gives your letter margins. -->
<div class="container">
{% for person in sorted_people %}
<!-- Everything in the following "person" div gets repeated for each person in your list -->
<div class="person">
<!-- This is where the Letter Content starts the <br> give margin at the top of your page.
Add or remove <br> to make it fit your stationary. -->
<div><br><br><br><br><br><br><br>
{% if org_hlogo != 'false' %}
<!-- If your not using a logo delete the <img class="org-logo" src="{{ org_logo }}"></div> line below.
You can adjust the size by changing height 80px above where it says img.org.logo.-->
<!-- Make your logo justify right -->
<div class="pull-right">
<img class="org-logo" src="{{ org_logo }}"></div>
{% endif %}
{% if org_name != 'false' %}
<h2>
{{ organization.name }}</h2><hr>
{% endif %}
<!-- Add or remove <br> to adjust the spacing below Organization Name and the salutation. -->
<br><br><br>
<!-- This is the Address on the right hand side. -->
<div class="pull-right">
<div class="text-right text-muted">
{% if person.addresses != empty %}
{% for address in person.addresses %}
<address>
{{ address.postal_address }} <!--({{ address.location }})-->
</address>
{% endfor%}
<!-- If there's no address keep the spacing the same on the letter! -->
{% else %}
<br><br><br><br>
{% endif %}
</div>
<!-- This is the Salutation. -->
<div class="media-body">
<h4 class="media-heading">Dear {{ person.name_prefix }}
{{ person.first_name }}
{{ person.middle_name }}
{{ person.last_name }}
{{ person.name_suffix }}Family,
<br>
<br>
</h4>
<!-- This is the body of your letter. Put two <br> at the end of each paragraph. -->
<body><p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras nec nibh nec mi vestibulum facilisis et fringilla sem. Sed semper vitae mauris sit amet tempus. Donec malesuada urna vitae urna hendrerit feugiat. Cras blandit tincidunt risus id venenatis. Maecenas sodales magna tempus lacus placerat euismod. Pellentesque elementum, tellus et consectetur dapibus, nulla nulla eleifend turpis, nec mattis massa elit ac ante. Nullam id neque odio. Nam sagittis et odio vel pretium. In porttitor tristique elementum. Nam a auctor orci. Aliquam auctor ipsum a enim pulvinar fringilla. Etiam hendrerit semper arcu, eu pellentesque leo. Nullam faucibus mauris eget aliquam laoreet. Integer aliquet tristique turpis, id dapibus sem placerat mollis. Sed posuere, felis non consequat vestibulum, nisi dolor ultrices justo, id consequat erat odio in nibh.<br><br>
Maecenas vitae nisi vulputate nisl finibus tempus id eu lectus. Fusce erat velit, consectetur rutrum ipsum sit amet, vestibulum commodo tortor. Curabitur ac mi lectus. Aliquam enim est, lobortis nec pharetra eget, pretium sit amet nisl. Nulla vehicula tristique convallis. Sed sit amet accumsan justo. Aenean vel dapibus augue. Proin nec nibh ex. In viverra maximus vestibulum. Nam molestie nisi eget aliquam ornare. Nulla tincidunt sem id sollicitudin elementum. Nam pellentesque risus tellus, eget rutrum tortor rhoncus sed. Vivamus pulvinar ligula ac lobortis ullamcorper. Suspendisse dictum in ante ac tincidunt. Quisque placerat elit eros, ut cursus mi consequat tempor. Praesent tincidunt accumsan arcu fermentum sollicitudin.<br><br>
Morbi ut nulla ut massa consequat viverra. Mauris ex sem, mollis nec pellentesque nec, maximus vitae dui. Etiam ut posuere quam. Phasellus volutpat diam ex, quis consequat dolor placerat dictum. Proin sem neque, facilisis eget sem ut, tincidunt consequat elit. Suspendisse justo libero, ullamcorper sit amet tempor quis, maximus maximus ligula. Praesent molestie tempor ligula non tempor. Morbi aliquam massa quis lorem luctus venenatis. Nulla a risus hendrerit, egestas ex vitae, porttitor risus. Aenean augue massa, varius vitae mollis quis, viverra sit amet purus. Sed accumsan mollis pellentesque. Aliquam eget neque sed erat finibus laoreet ac id dolor. Quisque convallis, libero in bibendum pretium, ligula quam rutrum est, vel dictum dui purus sed felis. Sed in pellentesque ex.<br><br>
<!-- This is the code for the footer logo -->
{% if org_flogo != 'false' %}
<div class="pull-right">
<img class="org-logo" src="{{ org_logo }}"></div>
{% endif %}
{{signature}}
</p></body>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</body>
</html>