|
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 |
StefanR Smarty n00b
Joined: 05 Apr 2004 Posts: 1
|
Posted: Sun Nov 14, 2004 1:34 pm Post subject: Variablen werden nicht ersetzt |
|
|
Hallo,
ich habe da ein kleines Problem und zwar werden bei meiner Ausgabe die Variablen absolut nicht ersetzt, sobald ich dem Script nicht ein eigenes Template zuweise also mit kompletter HTML Definition usw.
Die Kurzform des Ganzen (Artikel) funktioniert auch mit "kleinem" Template, aber ich poste mal den Code um das zu verdeutlichen.
long.php:
Code: | <?php
$alias=$_GET['alias'];
if (!empty($_GET['stid']))
{
$stid=$_GET['stid'];
}
else
{
$stid=0;
}
$artikel=getOneArticle($alias,$stid);
$tpl->assign('content',$tpl->fetch('artikel_l.htm'));
$tpl->assign('artikel',$artikel);
?> |
und artikel_l.htm:
Code: | <table width="100%" border="1">
<tr>
<td width="25%"><a href="<{$artikel.shortDescr}>.htm" name="<{$artikel.titel}>"><{$artikel.titel}></a></td>
<td width="75%"><{$artikel.created|date_format:"%m.%d.%Y %H:%M"}></td>
</tr>
<tr>
<td colspan="2">ss</td>
</tr>
<tr>
<td colspan="2"><{$artikel.name}></td>
</tr>
</table>
<{$artikel.hometext}> |
In der Debugkonsole stehen die Vars aber mit Inhalt drin nur das parsen klappt nicht.
PS Cache ist aus. |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Sun Nov 14, 2004 6:57 pm Post subject: |
|
|
äh. du musst *erst* $artikel assignen und *dann* artikel_l.html fetchen. |
|
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
|