Xenforo News Using keyed array in template

[XFB] Konu Bilgileri

Konu Hakkında Merhaba, tarihinde XenForo kategorisinde News tarafından oluşturulan Using keyed array in template başlıklı konuyu okuyorsunuz. Bu konu şimdiye dek 4 kez görüntülenmiş, 0 yorum ve 0 tepki puanı almıştır...
Kategori Adı XenForo
Konu Başlığı Using keyed array in template
Thread starter News
Start date
Replies
Views
First message reaction score
Son Mesaj Yazan News

News

Moderator
Top Poster Of Month
Credits
0
My controller has this:

PHP:

Code:
$colors = ['30' => 'blue', '55' => 'green'];

$viewParams = [
    'colors' => $colors,
    'entity1' => $entity1,
    'entity2' => $entity2
];

return $this->view('ASP\Foo:bar', 'asp_foo_bar', $viewParams);

And my template has this
HTML:

Code:
<xf:comment>
    {$entity1.sys_id} --> this prints 30
    {$entity2.sys_id} --> this prints 55
</xf:comment>

So basically, what I'm trying to achieve is PHP's equivalent of the following inside the template:
PHP:

$bgcolor1 =...

Read more

Okumaya devam et...
 

Back
Top