{{ if isset .Site.Params "emails" }}
{{ if .Site.Params.emails.enable }}

<div class="e_mail">
        <h2>{{ i18n "main_email_subscribe_title" }}</h2>
        <ul>
                {{ $mls := .Paginate (where .Data.Pages "Type" "maillist") }}
                {{ $sortedmls :=  $mls.Pages.ByParam "weight" }}
                {{ range first 2 $sortedmls}}
                <li>
                        <div>
                                <h3>{{ .Params.emailaddress }}</h3>
                                <p> {{ .Params.description }}</p>
                        </div>

                        <a href="{{ .Params.websitelink}}" target="_blank">
                                <div class="btn">{{ i18n "main_email_subscribe_buttontext" }} </div>
                        </a>
                </li>
                {{ end }}
        </ul>
</div>

{{ end }}
{{ end }}