Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access meta data fields in template #16

Open
CrucifixArnaud opened this issue Apr 13, 2014 · 1 comment
Open

Access meta data fields in template #16

CrucifixArnaud opened this issue Apr 13, 2014 · 1 comment
Labels

Comments

@CrucifixArnaud
Copy link

Hello,

I try to acces some meta data fields from a page into the layout (using it.document.var_name) but grunt keep throw an error:
* "Cannot read property 'page_title' of undefined Use".*

Any ideas ?

index.dot.html

{
  "template": "main",
  "page_title": "home"
}

<div class="page">
    <!-- Some Content -->
</div>

main.dot.html

<div class="{{= it.document.page_title }}">
    {{= it.document }}
</div>
szymonrw added a commit that referenced this issue Apr 14, 2014
This is an attempt to reproduce case from issue #16.
@szymonrw
Copy link
Contributor

I've created a test for this case because it seems there was none and it works (commit 911a3a8).

Could you try to reproduce your issue in a gist (with a Gruntfile) so that I can investigate it in more detail?

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

No branches or pull requests

2 participants