|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
the-styler Smarty Rookie
Joined: 12 Jul 2004 Posts: 25
|
Posted: Thu Jul 22, 2004 2:41 pm Post subject: include |
|
|
Wenn ich include verwende, dann kann ich ja Variablen an das zu includen template weitergeben.
folgendes z.B. funzt super: [php:1:1f957f36ac]{include file ="header.html" title = "Episodenguide"}[/php:1:1f957f36ac]
jetzt will ich aber noch zusätzlich eine weitere Variabel zu dem titel Episodenguide hinzufügen. Folgendes funzt nicht:[php:1:1f957f36ac]{include file ="header.html" title = "Episodenguide $variable.inhalt"}[/php:1:1f957f36ac]
dann habe ich das probiert: [php:1:1f957f36ac]{include file ="header.html" title = "Episodenguide" $variable.inhalt}[/php:1:1f957f36ac]
doch auch das funzte nicht. Folgendes ging aber: [php:1:1f957f36ac]{include file ="header.html" title = $variable.inhalt}[/php:1:1f957f36ac]
Da fehlt mir aber das Episodenguide. Wie mache ich es richtig? |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
|
Back to top |
|
coach Smarty Regular
Joined: 03 Jun 2004 Posts: 65
|
Posted: Thu Jul 22, 2004 7:12 pm Post subject: |
|
|
Hallo Styler,
alternativ (je nach Anwendungsfall) kannst du auch:
Code: | {capture name=episode}Episodenguide {$variable.inhalt}{/capture} | machen und dann die neue Variable übergeben
Code: | {include file="header.html" title=$smarty.capture.episode} |
Coach |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|