Closed zenorocha closed 11 years ago
Sure. So two things are important here:
templateData
your templates will have access to.<%- @partial('the-partial', @) %>
- which says, render the-partial
and send it everything I currently have access to (@
is this
in coffeescript)So, you'll want to:
templateData
configuration variable.@
with your partial call. If you need to send @
and some other special data, you can do <%- @partial('the-partial', @, {one:1,two:2,etc:3}) %>
Let me know how it goes :)
Hey @balupton,
This line of code <%- @partial('the-partial', @) %>
saved my day.
Thanks again for your awesome support!
I'm working in two important projects that uses DocPad, one for BrazilJS Foundation and another for Liferay. And your help has been precious.
I'm trying to use a variable from docpad.cson in my
src/partial/header.html.eco
by typing<%= @conf.name %>
, but I receive this error:This does not happen when I use this variable in my
src/layouts/default.html.eco
for example.So, can I access data from docpad.cson in partials @balupton?