Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Template Helpers #153

Open
mookiejones opened this issue Jun 16, 2015 · 3 comments
Open

Template Helpers #153

mookiejones opened this issue Jun 16, 2015 · 3 comments

Comments

@mookiejones
Copy link

Is there a proper way to use template helpers?

I am using
img.img-circle(alt="image" src="#{profileInfo 'photo'}" href="/profiles/#{_id}" )

but in order to use it i need to use
img.img-circle(alt="image" src="{{profileInfo 'photo'}}" href="/profiles/#{_id}" )

I want to mention that i did this because
img.img-circle(alt="image" src="#{profile.photo}" href="/profiles/#{_id}" )
shows up as missing a space

@benmgreene
Copy link

I also noticed today that the #{} syntax doesn't work with a helper that takes a parameter. In other words, #{helperFunction parameter} doesn't work, but {{helperFunction parameter}} does.

@avalanche1
Copy link
Contributor

+1

@dalgard
Copy link

dalgard commented Oct 14, 2015

I've modified a fork of this package to support passing arguments to helpers, together with a few other useful features. The fork has been released as dalgard:jade.

I will keep the new package in sync with the original, should there be any updates, and generally continue maintenance until, hopefully, the two packages can be merged.

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

No branches or pull requests

4 participants