smarty PHP şablona dizi parametrelerin dahil geçirmeden

0 Cevap php

Smarty şablon motoru (veya smarty en az bir yakın akrabası) kullanarak bir PHP sitede, ben dosyayı açıklık için burada atlanmıştır diğer HTML ile birlikte bu kod alıntıyı içeren ("header.html") dahil bir şablon arıyorum:

<title>{$title|escape:"html"}</title>
{if isset($META) && $META}
    {foreach from=$META item=m}
        <meta name="{$m[0]}" content="{$m[1]}">
    {/foreach}
{/if}

Şu anda ana sayfa şablonu bu satır var:

{include file="header.html" title="My WebSite Title Goes here"}

Benim HTML içine iki META etiketleri eklemek için bu satırı değiştirmek istiyorsanız, header.html şablonu arıyor dizi tanımlamak için doğru sözdizimi nedir?

Caveat: I'm unfamiliar with PHP, so I apologize if this is an obvious newbie question. Also, from some digging in the source code and from the comments below, I believe the site is using smarty for a template engine, although I can't be sure it's not a forked version.

0 Cevap