panini
panini copied to clipboard
Custom data on partials
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
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>