Skip to content

Passing HTML to templates? #339

Description

@Tikolu

Is there a way to pass HTML data to a template?

For example;

<!-- main.eta-->
<%~ include("template.html", {content: () => { %>
	<h1>Content</h1>
<% }}) %>
<!-- template.eta-->
<div id="template">
	<%~ it.content() %>
</div>

Alternatively, is there a way to temporarily render to a variable instead of the output?

(related issue #245)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions