|
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 |
alex01 Smarty n00b
Joined: 13 Aug 2021 Posts: 2
|
Posted: Fri Aug 13, 2021 1:13 pm Post subject: Chache loeschen mittels tpl |
|
|
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 |
|
Grizzly Smarty Pro
Joined: 15 Apr 2011 Posts: 172 Location: Germany
|
Posted: Mon Aug 16, 2021 6:00 am Post subject: |
|
|
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 |
|
|
|
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
|