|
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 |
ShadoX Smarty n00b
Joined: 14 May 2010 Posts: 4
|
Posted: Sun Jan 01, 2012 2:02 pm Post subject: Eigene Block-Funktionen funktioniert nicht - Fatal Error. |
|
|
Hallo, ich folgendes Senario erzeugt einen Fatal Error:
willkommen.tpl:
Code: | {extends file="layout.default.tpl"}
{block name="content"}{lang}hello{/lang} User{/block} |
layout.default.tpl:
Code: | {block name="content" nocache}{/block} |
index.php
Code: |
...
$this->caching = true;
$this->display('willkommen.tpl'); |
Fehler:
Code: | Fatal error: Call to undefined function smarty_block_lang() |
Der Fehler erscheint, wenn man das caching aktiviert.
Etv. fehlt eine if-condition wie diese: Code: | <?php if (!is_callable('smarty_block_lang')) include 'block.lang.php';
?> |
wie sie auch in compiled Templates enthalten ist.
Edit:
mit
Code: | include(ROOT_PATH."includes/libs/Smarty/plugins/block.lang.php");
$this->registerPlugin("block", "lang", "smarty_block_lang"); |
funktioniert es. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Mon Jan 02, 2012 8:52 pm Post subject: |
|
|
Dieser Fehler ist jetzt im SVN trunk beseitigt und wird später in 3.1.8 enthalten sein. |
|
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
|