emerald
emerald copied to clipboard
Can't call parent template vars from inside mixin
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)