This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Snirkum
Hi,
When i do this in a page code section: `function onstart() {
$this['errors'] = "oops";
$this['errors'] = "Damnit";
}` and in the page: `{% if errors %}
{% for key, error in errors %}
<p>{{ key }} -- {{ error }}</p>
{% endfor %}
{% endif %}` It does show anything, what am i doing wrong?
Snirkum
ok, figured out. If you want to declare an array i have to do it like this: ` $this['errors'] = ["Damnit", "oops!"]; `
1-2 of 2