Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to limit the number of Entries that show in the newsletter? #29

Open
andywise123 opened this issue Mar 15, 2021 · 0 comments

Comments

@andywise123
Copy link

I'd love to be able to limit the number of entries that show up in the newsletter. I tried to do this by adapting the sample template on the web implementation, and hard coding the number of headlines in line 48:
{{#lt @Index 7 }} ... {{/lt}}
but what I'd like to do for my less technical fellow board members is to have it entered in a web form and then that gets sucked into the mjml file and that limits the number of headlines in the newsletter. I tried this using a new version of the website form you created by changing the Intro field into an input type=number and then changing the line above to
{{#lt @Index {{intro}} }}
or
{{#lt @Index {{[intro]}} }}
or (at Karl's suggestion)
{{#lt @Index intro }}
or
{{#lt @Index [intro] }}
but I just get an error and nothing displays or I get the rest of the template and no Entries at all.

I saw on GitHub that there's a Limit function, but I couldn't figure out how to get this to work with my limited skills.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant