Husband & Wife Mailing Labels with kid options
Imports: 45

Prints Avery labels like default Household label but with 'Husband & Wife' Note: If there are more than 2 adults in the Household, the label will look wonky.

Preview

Report Preview


  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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
<!-- Quick Customization

Version: 2020.12.16

ADULT NAME FORMATTING:

    CHANGE BELOW TO CHOOSE HOW TO ORDER ADULTS (gender, primary, alpha)
    {% assign orderby = "gender" %}

    CHANGE BELOW TO F TO DISPLAY FEMALE FIRST
    {% assign gender_first = "m" %}

CHILD NAME FORMATTING:
		
		Change below to choose how to order children (oldest, youngest, alpha)
		{% assign child_orderby = "oldest" %}

Option 1:
First Name & First Name Last Name
John & Jane Jones

Option 2:
First Name and First Name Last Name
John and Jane Jones

Option 3:
Mr. and Mrs. First Name Last Name
Mr. and Mrs. John Jones

Option 4:
Prefix First Name Last Name & Prefix First Name Last Name
Rev. John Jones & Dr. Jane Jones

Option 5:
First Name & First Name Last Name
Kids Names
John & Jane Jones
Jimmy, James, Jenny

Option 6:
First Name and First Name Last Name
Kids Names
John and Jane Jones
Jimmy, James, Jenny

Option 7
First Name, First Name, & First Name Last Name
John, Mary, & Joseph Jones

Option 8:
First Name Last Name, First Name Last Name, & First Name Last Name
John Jones, Mary Martha, & Joseph Jessup

CHOOSE FORMATTING OPTION ABOVE AND ENTER CORRESPONDING NUMBER:
{% assign name_formatting = "1" %}
{% assign no_show = "Mr.,Mrs.,Miss,Ms." | split: "," %}

USED FOR SHOWING SINGLE ADULTS, ADD MORE PER ACCOUNT WITH COMMA SEPARATING:
{% assign marital_filter = "Single,Divorced,Widowed" | Split: "," %}


To print a label with the household name, set to true
To print labels with the last name of the primary contact, set to false
{% assign print_household_name = true %}

To only print labels for people who have an address, set the below to true
To print labels for every household in the list, set to false
{% assign address_present = true %}

-->
{{ helpers.bootstrap_3 }}
<html>
  <head>
    <title>Avery Labels (1" x 2 5/8" - 5160)</title>
    <style>
      @page { margin: 0.5in 0in 0in 0.0825in; size: US-Letter; }
      ul { margin: 0 0 0 0.1in; padding: 0; }
      ul.labels li {
        margin: 0 0.14in 0 0;
        padding: 0;
        float: left;
        width: 2.625in;
        height: 1in;
        display: block;
        font-size: 11pt;
      }
      ul.labels li div.address {
        margin-left: 0.125in;
        margin-top: 0.1in;
      }
      
      .kids {font-size:9pt;}
    </style>
  </head>
  <body>
    <ul class="labels">
      {% assign sorted_households = households | sort: 'name' %}
      {% for household in sorted_households %}
      {% assign male_name = "" %}
      {% assign male_pre = "" %}
      {% assign female_pre = "" %}
      {% assign female_name = "" %}
      {% assign name_list = "" | split: "," %}
      {% assign kids_name_list = "" %}
       {% assign skip_adults = "no" %}
        {% if household.primary_address or address_present == false %}
          {% if print_household_name == true %}
            <li>
              <div class="address">
               {% if name_formatting == "1" %}
                    {% for adult in household.active_adults %}
                     {% if adult.marital_status == "Married" and household.active_adults.size > 1 %} 
                        {% if adult.gender == "M" %}{% assign male_name = adult.first_name %}{% assign last = adult.last_name %}{% endif %}
                        {% if adult.gender == "F" %}{% assign female_name = adult.first_name %}{% endif %}
                        {% if adult.first_name == household.primary_contact.first_name %}
                            {% assign pri_name = adult.first_name %}
                        {% else %}
                            {% assign oth_name = adult.first_name %}
                        {% endif %}
                        {% assign name_list = name_list | append: adult.first_name | append: "," %}
                        {% assign skip_adults = "yes" %}	
                     {% elsif household.active_adults.size == 1 or marital_filter contains adult.marital_status and adult.marital_status != "" %}
                      {% if skip_adults == "no" %}
                      {% unless no_show contains adult.name_prefix %}{{ adult.name_prefix }} {% endunless %}{{ adult.first_name }} {% assign last = adult.last_name %}
                      {% endif %}
                     {% endif %}
                    {% endfor %}
                    {% if skip_adults == "yes" %}
                      {% if orderby == "gender" %}
                        {% if gender_first == "m" %}
                          {{ male_name }} & {{ female_name }}
                        {% elsif gender_first == "f" %}
                          {{ female_name }} & {{ male_name }}
                        {% endif %}
                      {% elsif orderby == "primary" %}
                        {{ pri_name }} & {{ oth_name }}
                      {% elsif orderby == "alpha" %}
                        {% assign name_list_sorted = name_list | remove: "[]" | split: "," | sort %}
                        {% for name in name_list_sorted %}
                         {% unless forloop.first %} & {% endunless %}{{ name }}
                        {% endfor %}
                      {% endif %}
                    {% endif %} {{last}}
               {% elsif name_formatting == "2" %}
                    {% for adult in household.active_adults %}
                     {% if adult.marital_status == "Married" and household.active_adults.size > 1 %} 
                        {% if adult.gender == "M" %}{% assign male_name = adult.first_name %}{% endif %}
                        {% if adult.gender == "F" %}{% assign female_name = adult.first_name %}{% endif %}
                        {% if adult.first_name == household.primary_contact.first_name %}
                            {% assign pri_name = adult.first_name %}
                        {% else %}
                            {% assign oth_name = adult.first_name %}
                        {% endif %}
                        {% assign name_list = name_list | append: adult.first_name | append: "," %}
                        {% assign skip_adults = "yes" %}	
                     {% elsif household.active_adults.size == 1 or marital_filter contains adult.marital_status and adult.marital_status != "" %}
                      {% if skip_adults == "no" %}
                      {% unless no_show contains adult.name_prefix %}{{ adult.name_prefix }} {% endunless %}{{ adult.first_name }}
                      {% endif %}
                     {% endif %}
                     {% assign last = adult.last_name %}
                    {% endfor %}
                    {% if skip_adults == "yes" %}
                      {% if orderby == "gender" %}
                        {% if gender_first == "m" %}
                          {{ male_name }} and {{ female_name }}
                        {% elsif gender_first == "f" %}
                          {{ female_name }} and {{ male_name }}
                        {% endif %}
                      {% elsif orderby == "primary" %}
                        {{ pri_name }} and {{ oth_name }}
                      {% elsif orderby == "alpha" %}
                        {% assign name_list_sorted = name_list | remove: "[]" | split: "," | sort %}
                        {% for name in name_list_sorted %}
                         {% unless forloop.first %} and {% endunless %}{{ name }}
                        {% endfor %}
                      {% endif %}
                    {% endif %} {{last}}
               {% elsif name_formatting == "3" %}
                    {% for adult in household.active_adults %}
                     {% if adult.marital_status == "Married" and adult.gender == "M" %}
                      Mr. and Mrs. {{ adult.first_name }}
                      {% assign skip_adults = "yes" %}
                     {% elsif household.active_adults.size < 2 or marital_filter contains adult.marital_status and adult.marital_status != "" %}
                      {% if skip_adults == "no" %}
                      {{ adult.name_prefix }} {{ adult.first_name }}
                      {% endif %}
                     {% endif %}
                     {% if forloop.last %}{{ adult.last_name }}{% endif %}
                    {% endfor %}
               {% elsif name_formatting == "4" %}
                    {% for adult in household.active_adults %}
                     {% if adult.marital_status == "Married" and household.active_adults.size > 1 %} 
                        {% if adult.gender == "M" %}
                					{% assign male_name = adult.first_name %}
                					{% assign male_pre = adult.name_prefix%}
                				{% endif %}
                        {% if adult.gender == "F" %}
                					{% assign female_name = adult.first_name %}
                					{% assign female_pre = adult.name_prefix %}
                				{% endif %}
                        {% if adult.first_name == household.primary_contact.first_name %}
                            {% assign pri_name = adult.first_name %}
                						{% assign pri_pre = adult.name_prefix %}
                        {% else %}
                            {% assign oth_name = adult.first_name %}
                						{% assign oth_pre = adult.name_prefix %}
                        {% endif %}
         								{% unless no_show contains adult.name_prefix %}
                					{% assign pre_use = adult.name_prefix | append: " " %}
                				{% else %}
                					{% assign pre_use = "" %}
                				{% endunless %}
                        {% assign name_list = name_list | append: pre_use | append: adult.first_name | append: "," %}
                        {% assign skip_adults = "yes" %}	
                     {% elsif household.active_adults.size == 1 or marital_filter contains adult.marital_status and adult.marital_status != "" %}
                      {% if skip_adults == "no" %}
                      {% unless no_show contains adult.name_prefix %}{{ adult.name_prefix }} {% endunless %}{{ adult.first_name }} {{ adult.last_name }}
                      {% endif %}
                     {% endif %}
                     {% assign last = adult.last_name %}
                    {% endfor %}
                    {% if skip_adults == "yes" %}
                      {% if orderby == "gender" %}
                        {% if gender_first == "m" %}
                          {% unless no_show contains male_pre %}{{ male_pre }} {% endunless %}{{ male_name }} {{last }} & {% unless no_show contains female_pre %}{{ female_pre }} {% endunless %}{{ female_name }} {{ last }}
                        {% elsif gender_first == "f" %}
                          {% unless no_show contains female_pre %}{{ female_pre }} {% endunless %}{{ female_name }} {{last }} & {% unless no_show contains male_pre %}{{ male_pre }} {% endunless %}{{ male_name }} {{ last }}
                        {% endif %}
                      {% elsif orderby == "primary" %}
                        {% unless no_show contains pri_pre %}{{ pri_pre }} {% endunless %}{{ pri_name }} {{ last }} & {% unless no_show contains oth_pre %}{{ oth_pre }} {% endunless %}{{ oth_name }} {{ last }}
                      {% elsif orderby == "alpha" %}
                        {% assign name_list_sorted = name_list | remove: "[]" | split: "," | sort %}
                        {% for name in name_list_sorted %}
                         {% unless forloop.first %} & {% endunless %}{{name}} {{ last }}
                        {% endfor %}
                      {% endif %}
                    {% endif %}
               {% elsif name_formatting == "5" %}
                    {% for adult in household.active_adults %}
                     {% if adult.marital_status == "Married" and household.active_adults.size > 1 %} 
                        {% if adult.gender == "M" %}{% assign male_name = adult.first_name %}{% endif %}
                        {% if adult.gender == "F" %}{% assign female_name = adult.first_name %}{% endif %}
                        {% if adult.first_name == household.primary_contact.first_name %}
                            {% assign pri_name = adult.first_name %}
                        {% else %}
                            {% assign oth_name = adult.first_name %}
                        {% endif %}
                        {% assign name_list = name_list | append: adult.first_name | append: "," %}
                        {% assign skip_adults = "yes" %}	
                     {% elsif household.active_adults.size == 1 or marital_filter contains adult.marital_status and adult.marital_status != "" %}
                      {% if skip_adults == "no" %}
                      {% unless no_show contains adult.name_prefix %}{{ adult.name_prefix }} {% endunless %}{{ adult.first_name }}
                      {% endif %}
                     {% endif %}
                     {% assign last = adult.last_name %}
                    {% endfor %}
                    {% if skip_adults == "yes" %}
                      {% if orderby == "gender" %}
                        {% if gender_first == "m" %}
                          {{ male_name }} & {{ female_name }}
                        {% elsif gender_first == "f" %}
                          {{ female_name }} & {{ male_name }}
                        {% endif %}
                      {% elsif orderby == "primary" %}
                        {{ pri_name }} & {{ oth_name }}
                      {% elsif orderby == "alpha" %}
                        {% assign name_list_sorted = name_list | remove: "[]" | split: "," | sort %}
                        {% for name in name_list_sorted %}
                         {% unless forloop.first %} & {% endunless %}{{ name }}
                        {% endfor %}
                      {% endif %}
                    {% endif %} {{last}}
                		{% for child in household.active_children %}
                    	{% assign kids_name_list = kids_name_list | append: "[" | append: "Name:" | append: child.first_name | append: "," | append: "Age:" | append: child.age | append: "]" | append: "+" %}
                    {% endfor %}
                		{% assign kid_split = kids_name_list | split: "+" %}
                		{% if child_orderby == "alpha" %}
                			{% assign kid_sorted = kid_split | sort: child.first_name %}
                		{% elsif child_orderby == "oldest" %}
                			{% assign kid_sorted = kid_split | sort: child.age | reverse %}
                		{% elsif child_orderby == "youngest" %}
                			{% assign kid_sorted = kid_split | sort: child.age %}
                		{% endif %}
                		<span class="kids">
                		{% for kid in kid_sorted %}
                			{% assign kname = kid | split: "," %}
                      	{% if forloop.first %} <br/> {% endif %}
                      	{{kname.first | remove: "[Name:"}}{% unless forloop.last %}, {% endunless %}
                		{% endfor %}
                		</span>
               {% elsif name_formatting == "6" %}
                    {% for adult in household.active_adults %}
                     {% if adult.marital_status == "Married" and household.active_adults.size > 1 %} 
                        {% if adult.gender == "M" %}{% assign male_name = adult.first_name %}{% endif %}
                        {% if adult.gender == "F" %}{% assign female_name = adult.first_name %}{% endif %}
                        {% if adult.first_name == household.primary_contact.first_name %}
                            {% assign pri_name = adult.first_name %}
                        {% else %}
                            {% assign oth_name = adult.first_name %}
                        {% endif %}
                        {% assign name_list = name_list | append: adult.first_name | append: "," %}
                        {% assign skip_adults = "yes" %}	
                     {% elsif household.active_adults.size == 1 or marital_filter contains adult.marital_status and adult.marital_status != "" %}
                      {% if skip_adults == "no" %}
                      {% unless no_show contains adult.name_prefix %}{{ adult.name_prefix }} {% endunless %}{{ adult.first_name }}
                      {% endif %}
                     {% endif %}
                     {% assign last = adult.last_name %}
                    {% endfor %}
                    {% if skip_adults == "yes" %}
                      {% if orderby == "gender" %}
                        {% if gender_first == "m" %}
                          {{ male_name }} and {{ female_name }}
                        {% elsif gender_first == "f" %}
                          {{ female_name }} and {{ male_name }}
                        {% endif %}
                      {% elsif orderby == "primary" %}
                        {{ pri_name }} and {{ oth_name }}
                      {% elsif orderby == "alpha" %}
                        {% assign name_list_sorted = name_list | remove: "[]" | split: "," | sort %}
                        {% for name in name_list_sorted %}
                         {% unless forloop.first %} and {% endunless %}{{ name }}
                        {% endfor %}
                      {% endif %}
                    {% endif %} {{last}}
                		{% for child in household.active_children %}
                    	{% assign kids_name_list = kids_name_list | append: "[" | append: "Name:" | append: child.first_name | append: "," | append: "Age:" | append: child.age | append: "]" | append: "+" %}
                    {% endfor %}
                		{% assign kid_split = kids_name_list | split: "+" %}
                		{% if child_orderby == "alpha" %}
                			{% assign kid_sorted = kid_split | sort: child.first_name %}
                		{% elsif child_orderby == "oldest" %}
                			{% assign kid_sorted = kid_split | sort: child.age | reverse %}
                		{% elsif child_orderby == "youngest" %}
                			{% assign kid_sorted = kid_split | sort: child.age %}
                		{% endif %}
                		<span class="kids">
                		{% for kid in kid_sorted %}
                			{% assign kname = kid | split: "," %}
                      	{% if forloop.first %} <br/> {% endif %}
                      	{{kname.first | remove: "[Name:"}}{% unless forloop.last %}, {% endunless %}
                		{% endfor %}
                		</span>
               {% elsif name_formatting == "7" %}
                    {% for adult in household.active_adults %}
                			{% if forloop.length == 1 %}
                				{{ adult.first_name }}
                			{% elsif forloop.length == 2 %}
                				{{ adult.first_name }}{% unless forloop.last %} & {% endunless %}
                			{% else %}
                				{% if forloop.last %}& {% endif %}{{ adult.first_name }}{% unless forloop.last %}, {% endunless %}
                			{% endif %}
                		  {% if forloop.last %} {{ adult.last_name }}{% endif %}
                		{% endfor %} 
               {% elsif name_formatting == "8" %}
                    {% for adult in household.active_adults %}
                			{% if forloop.length == 1 %}
                				{{ adult.first_name }} {{ adult.last_name}}
                			{% elsif forloop.length == 2 %}
                				{{ adult.first_name }} {{ adult.last_name }}{% unless forloop.last %} & {% endunless %}
                			{% else %}
                				{% if forloop.last %}& {% endif %}{{ adult.first_name }} {{ adult.last_name }}{% unless forloop.last %}, {% endunless %}
                			{% endif %}
                		{% endfor %} 
               {% endif %}
                <br/>{{ household.primary_address.street }}
                <br>{{ household.primary_address.city }} {{ household.primary_address.state }} {{ household.primary_address.zip }} 
              </div>
            </li>
          {% else %}
            <li>
              <div class="address">
                The {{ household.primary_contact.last_name }} Household<br>
                {{ household.primary_address.street }}
                {{ household.primary_address.city }} {{ household.primary_address.state }} {{ household.primary_address.zip }} 
              </div>
            </li>      			
          {% endif %}
        {% endif %}
      {% endfor %}
    </ul>
  </body>
</html>