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

Mixins are not supported #5

Closed
kryten87 opened this issue Feb 3, 2016 · 1 comment
Closed

Mixins are not supported #5

kryten87 opened this issue Feb 3, 2016 · 1 comment
Labels

Comments

@kryten87
Copy link

kryten87 commented Feb 3, 2016

To reproduce: use the example code in the example/actions directory & amend the template to the following:

mixin ListItem
    li This is from the mixin

doctype html
html(lang=en)
    head
        meta(charset=utf-8)
        title Title
    body
        p ads
        ul
            li The name is {{.Name}}.
            li The age is {{.Age}}.
            +ListItem

        range .Emails
            div An email is {{.}}

        with .Jobs
            range .
                div.
                 An employer is {{.Employer}}
                 and the role is {{.Role}}

This results in the following error message in the console: Template parse error: template: html:3: function "mixin" not defined

Any plans to implement mixins?

@Joker
Copy link
Owner

Joker commented May 18, 2016

I'm developing a simple mixin realization now but without support of mixin-blocks, attributes and rest arguments. I would implement it in a separate package if i decide to add its support.

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

No branches or pull requests

2 participants