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

Chache loeschen mittels tpl

 
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
alex01
Smarty n00b


Joined: 13 Aug 2021
Posts: 2

PostPosted: Fri Aug 13, 2021 1:13 pm    Post subject: Chache loeschen mittels tpl Reply with quote

Guten Tag

Ich bin absoluter Neuling was Smarty und PHP betrifft.

Jetzt gibt es ja die Funktion:
Code:
$smarty->clearAllCache();


Nur wie binde ich diesen in meine tpl ein, sodass ein klick auf einen Link den cache auch löscht?

danke für etwaige Hilfe
alex
Back to top
View user's profile Send private message
Grizzly
Smarty Pro


Joined: 15 Apr 2011
Posts: 172
Location: Germany

PostPosted: Mon Aug 16, 2021 6:00 am    Post subject: Reply with quote

Hallo alex01 und willkommen im Forum und bei Smarty,

diesen Code solltest du nicht im Template ausführen, sondern in deinem PHP Code. Das ist eines der wichtigsten Dinge überhaupt, zu verstehen, dass im Template nur die Anzeige-Schicht ist. Also keine "Logik" enthalten sollte (ich meine damit nicht if, else und schleifen usw.) sondern sowas wie Berechnungen und/oder PHP Code (auch wenn es theoretisch gehen würde)
Back to top
View user's profile Send private message Visit poster's website
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