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

Custom data on partials #147

Open
ejpg opened this issue Dec 28, 2017 · 1 comment
Open

Custom data on partials #147

ejpg opened this issue Dec 28, 2017 · 1 comment

Comments

@ejpg
Copy link

ejpg commented Dec 28, 2017

Im trying to create one partial into another, and i want to put panini's yml custom data in the head of the file.

Here's an example

partials/home_cards_es.html

---
btn: COMPRAR
---
{{> home_cards}}

partials/home_cards_en.html

---
btn: BUY
---
{{> home_cards}}

Is there a way to do this?

Thanksssss

@kazagkazag
Copy link

You can pass argument to custom partial:

page:

---
layout: transactional-email
subject: Transactional email prototype
linkTitle: CLICK ME PLEASE
---
{{#> link href="http://page.com" title=linkTitle }}
    My label
{{/link}}

and partial:

<a href="{{href}}" class="link" title="{{title}}">{{> @partial-block }}</a>

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

No branches or pull requests

2 participants