Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Twig - modyfikowanie kontekstu jednego pliku w kilku linijkach
mrWodoo
post 25.03.2012, 11:29:47
Post #1





Grupa: Zarejestrowani
Postów: 160
Pomógł: 6
Dołączył: 13.01.2012
Skąd: Bytom

Ostrzeżenie: (0%)
-----


Witam, jak mogę modyfikować kontekst templaty w kilku miejscach?
Normalnie robię to tak:
  1. echo $this->Core->getTwig()->render( 'header.tpl', array(
  2. 'Ceres' => array(
  3. 'template_dir' => Templates_Dir . $this->Core->getCollection()->getMember( 'Settings' )->getSetting( 'board_template' ) . '/',
  4. 'global_css' => Public_Dir . 'Css/' ) ) );


A chciałbym zrobić w niektórych miejscach tak:
  1. ustaw kontekst dla header.tpl
  2. jakies operacje
  3. ustaw dodatkowy kontekst dla header.tpl
  4. echo $this->Core->getTwig()->render( 'header.tpl', array(
  5. 'Ceres' => array(
  6. 'template_dir' => Templates_Dir . $this->Core->getCollection()->getMember( 'Settings' )->getSetting( 'board_template' ) . '/',
  7. 'global_css' => Public_Dir . 'Css/' ) ) );


--------------------
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 8.07.2025 - 02:14