 |
Smarty
The discussions here are for Smarty, a template engine for the PHP programming language. Dedicated server web hosting provided by Guru-host.eu. |
| View previous topic :: View next topic |
| Author |
Message |
ShadoX Smarty n00b
Joined: 14 May 2010 Posts: 4
|
Posted: Mon Jan 02, 2012 11:58 pm Post subject: parent block in includes templates bleibt leer |
|
|
Hallo,
zunächst Danke für den Bug-Fix der Plugins.
Was mir noch aufgefallen ist, wenn der parent block in einer includierten Template sich befindet, dieser nicht gefüllt wird. Wenn caching aktiv ist, gibt es keine Fehler.
Hier ein Beispiel:
layout.default.tpl
| Code: |
{include file="header.tpl"}
|
header.tpl
| Code: |
<head>
<title>{block name="title"} - MyHomepage{/block}</title></div>
|
welcome.tpl
| Code: | {extends file="layout.default.tpl"}
{block name="title" prepend}Willkommen{/block} |
Es macht kein Unterschied, ob prepend als Attribut vorhanden ist oder nicht.
Gruß
Last edited by ShadoX on Tue Jan 03, 2012 11:24 am; edited 1 time in total |
|
| Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 4177 Location: Hamburg / Germany
|
Posted: Tue Jan 03, 2012 12:43 am Post subject: |
|
|
In Deinem Beispiel wird ja header.tpl nirgendwo included.
Mit layout.default.tpl
| Code: | | {include file='header.tpl'} |
funktioniert es. |
|
| 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
|