Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [smarty] {include file="$JakWstawicZmienna/header.tpl}
[fisher]
post
Post #1





Grupa: Zarejestrowani
Postów: 151
Pomógł: 0
Dołączył: 4.03.2003

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


Witam, moze to proste, ale nie moge wpasc na to

mam takowy fragment pliku szablonu

Kod
{include file="$smarty.session.theme/header.tpl"}


$smarty.session.theme to jak wiadomo _SESSION['theme']

nie wiem jak to poprawnie wstawic

moja propozycja powoduje ze, smarty wywala takowym bledem

Cytat
Fatal error: syntax error: $smarty. is an unknown reference



bede wdzieczny za wszelakie sugestie
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
eXtreme
post
Post #2





Grupa: Zarejestrowani
Postów: 56
Pomógł: 0
Dołączył: 14.06.2002

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


a może sprobuj:
Kod
{include file="'$smarty.session.Theme'/header.tpl"}


W manualu jest napisne:
Cytat
SYNTAX EXAMPLES:
{func var="test $foo test"}       <-- sees $foo
{func var="test $foo_bar test"}   <-- sees $foo_bar
{func var="test $foo[0] test"}    <-- sees $foo[0]
{func var="test $foo[bar] test"}  <-- sees $foo[bar]
{func var="test $foo.bar test"}   <-- sees $foo (not $foo.bar)
{func var="test `$foo.bar` test"} <-- sees $foo.bar

PRACTICAL EXAMPLES:
{include file="subdir/$tpl_name.tpl"} <-- will replace $tpl_name with value
{cycle values="one,two,`$smarty.config.myval`"} <-- must have backticks
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 6.10.2025 - 16:08