flyx / emerald

HTML5 templating engine for Nimrod
Do What The F*ck You Want To Public License
95 stars 9 forks source link

Can't call parent template vars from inside mixin #24

Open konradmb opened 5 years ago

konradmb commented 5 years ago
import emerald
proc mySection() {.html_mixin.} =
    section:
        h1: title
        put mixin_content()

proc parent(title: string) {.html_templ.} =
    block content:
        h1: title

proc templ(numItems: int) {.html_templ: parent.} =
    append content:
        call_mixin mySection():
            p: "Content"

Result:

../emerald/src/emerald/html.nim(343, 25) Error: expression ':obj427134' has no type (or is ambiguous)