This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
RyanHavoc
So I have a partial within a partial. The child partial accepts variables. I want to set a variable on the parent partial and pass that into the child partial?
ndcisiv
I don't see why not. I placed this in my template:
{% partial "footer" myvar="test text" %}
Then in my footer partial I placed this:
{% partial "subfooter" myvar=myvar %}
Then of course in my subfooter to test I added:
{{ myvar }}
And viola! It display "test text". Might not be exactly what you were hoping for, but it's a working way.
RyanHavoc
Top man. Just what I wanted.
I was trying:
{% partial "subfooter" myvar="{{ myvar }}" %}
Obviously to no avail. It was just a matter of discovering the right syntax it would seem.
Thanks
Last updated
1-3 of 3