Skip to content

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

@andywise123

Description

@andywise123

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions