def renderer(ctx, data): # Load the template # template = tags.invisible[skin.loader(name, ignoreDocType=True)] template = tags.invisible[skin.loader(name)] # Fill the inherited template's slots with any available patterns. for filler in stan.specials(ctx.tag, 'pattern'): template.fillSlots( filler._specials['pattern'], inevow.IQ(ctx.tag).allPatterns(filler._specials['pattern']) ) return template
def _(ctx, data): # It would probably be better to have some IMacro interface to # locate but the page itself will do for now. page = findPageContext(ctx).tag # Get the macro. macroTag = page.locateMacro(ctx, name) # Fill the macro's slots with any available patterns. for filler in stan.specials(ctx.tag, "pattern"): macroTag.fillSlots(filler._specials["pattern"], inevow.IQ(ctx.tag).allPatterns(filler._specials["pattern"])) # Return the macro return macroTag