问题
On Octobercms blogPosts
component I want to pass a variable. I want to change postsPerPage
value using:
{repeater name="fields" groups="~/themes/demo/myfields.yaml" tab="MyFields"}
{/repeater}
on static layout.
myfields.yaml
blogfield:
name: Blog Field
description: My Blog Field
fields:
fields_blog_number:
label: Posts Number
type: number
span: right
And I render it with:
{% for field in fields%}
...
{% endfor %}
So i want to be able to change postsPerPage
component value with this field on static Pages.
I use a partial with blogPosts
component.
I try to insert a number in my field on my static page but is not working. Any idea on how can I pass variables on component?
来源:https://stackoverflow.com/questions/55421938/passing-variable-to-octobercms-blogposts-component-using-a-repeater-markup