![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 43 Pomógł: 0 Dołączył: 5.07.2007 Ostrzeżenie: (0%) ![]() ![]() |
Witam. Od pewnego czasu zacząłem używać smarty. Mam taki problem w pliku index.tpl Smarty ma mi includować odpowiedni plik zależnie od zawartości geta, mam takie coś
Kod {if empty($smarty.get.id)} {include file=zawartosc.tpl} {else} {include file=$smarty.get.id} {/if} Teraz jeżeli get jest pusty to wyświetla prawidłowo , ale jeżeli get już przybiera wartość np sonda to dostaje komunikat z errorem. Kod Warning: Smarty error: unable to read resource: "sonda" in /home/xxx/xxx/xxx/public_html/0.2/libs/Smarty.class.php on line 1092
Ten post edytował kiddy 12.10.2008, 11:27:11 |
|
|
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 161 Pomógł: 25 Dołączył: 6.09.2008 Skąd: Warszawa Ostrzeżenie: (0%) ![]() ![]() |
Po prostu smarty nie może odnaleźć szablonu, zapewne dlatego, że nie dodajesz rozszerzenia.
Spróbuj użyć Kod {include file="`$smarty.get.id`.tpl"}
Ten post edytował piaseq 12.10.2008, 13:15:38 |
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 43 Pomógł: 0 Dołączył: 5.07.2007 Ostrzeżenie: (0%) ![]() ![]() |
Działa , dziękuję.
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 26.08.2025 - 16:39 |