Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Funktion _smarty_include

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
Modulexpert
Smarty n00b


Joined: 11 Sep 2014
Posts: 1

PostPosted: Thu Sep 11, 2014 8:51 am    Post subject: Funktion _smarty_include Reply with quote

Hallo!

Ich möchte gerne von V2.6 auf V3.1 updaten. derzeit hänge ich leider fest.

Ich habe folgenden Code(v2.6) in der Extendclass:
Code:

    function _smarty_include($params)
    {
        $params['smarty_include_tpl_file'] = $this->getEditFile($params['smarty_include_tpl_file']);
        return parent::_smarty_include($params);
    }

Da es nun in der V3 diese funktion und auch der Parameter nicht mehr vorhanden sind ,hoffe ich das mir hier einer helfen kann wie ich diese Funktion in V3 erstellen muß.

Ich bedanke im im vorraus für die Hilfe

mfg
Thorsten
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Sat Sep 13, 2014 8:45 pm    Post subject: Reply with quote

Smarty 3.1 hat vollig andere interne structuren. Ich sehe nur die Verwendung eines Modifier als Lösung.

Code:
$smarty->$smarty->registerPlugin("modifier","EditFile",array($this, 'getEditFile'));


und in den Templates dann
Code:
{include file='foo.tpl'|EditFile}
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    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