This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

Fibonacci
Fibonacci

I have this example code:

page home

{% partial 'home/header' menus = "home, contact" %}

my question is, how to get the 'menus' variable in php section like onStart?

Thanks

jwilson8767
jwilson8767

I believe you can access them in the php block via $this['menus'].

Fibonacci
Fibonacci

jwilson8767 said:

I believe you can access them in the php block via $this['menus'].

It's doesn't work.

Tschallacka
Tschallacka

I think partials are executed AFTER php. (correct me if i'm wrong)

So you can't access them on the php side. the same as you can't use javascript variables in php.

1-4 of 4

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.