Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

include

 
Post new topic   Reply to topic    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
the-styler
Smarty Rookie


Joined: 12 Jul 2004
Posts: 25

PostPosted: Thu Jul 22, 2004 2:41 pm    Post subject: include Reply with quote

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
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Thu Jul 22, 2004 2:48 pm    Post subject: Reply with quote

du brauchst dafür backticks, siehe: http://smarty.php.net/manual/en/language.syntax.quotes.php
Back to top
View user's profile Send private message Send e-mail Visit poster's website
coach
Smarty Regular


Joined: 03 Jun 2004
Posts: 65

PostPosted: Thu Jul 22, 2004 7:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Language: German All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP