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

Search found 7 matches
Smarty Forum Index
Author Message
  Topic: fetch prints result
mwaack

Replies: 7
Views: 19421

PostForum: Bugs   Posted: Thu Sep 13, 2018 5:21 am   Subject: Thats it
Thats the problem, why its displayed when i use "fetch" and not "display"

I Know the Error, but i want to catch it and display another Template, not the current.

The Error co ...
  Topic: fetch prints result
mwaack

Replies: 7
Views: 19421

PostForum: Bugs   Posted: Wed Sep 12, 2018 11:57 am   Subject: fetch prints result
The code is just an example, i have no die();

I have tested:

try {
set_error_handler(function ($s, $m, $f, $l, $c = null) {
...
  Topic: fetch prints result
mwaack

Replies: 7
Views: 19421

PostForum: Bugs   Posted: Wed Sep 12, 2018 11:21 am   Subject: fetch prints result
When u make an error in the template and user fetch() to store the Result, its always printing.

code looks like:
try {
$output = $smarty->fetch('file');
} catch (Exc ...
  Topic: Template aus Variable und nicht aus Datei
mwaack

Replies: 20
Views: 76773

PostForum: Language: German   Posted: Fri Sep 07, 2018 8:12 pm   Subject: Template aus Variable und nicht aus Datei
Versuchs mal damit:
https://www.smarty.net/docs/en/resources.string.tpl

<?php
$smarty->assign('foo','value');
$template_string = 'display {$foo} here';
$smarty->displ ...
  Topic: if-Abfrage mit eigener Funktion funktioniert nicht
mwaack

Replies: 4
Views: 24363

PostForum: Language: German   Posted: Sun May 07, 2017 10:39 am   Subject: if-Abfrage mit eigener Funktion funktioniert nicht
Du kannst auch eine Klasse an eine Variable binden und dann in einem If Block benutzen.

class foo {
function test($argument) {
.....
return true;
}
}
...
  Topic: Cache system falsch verstanden? (Login Formular)
mwaack

Replies: 8
Views: 29653

PostForum: Language: German   Posted: Sun May 07, 2017 10:10 am   Subject: Cache system falsch verstanden? (Login Formular)
Entscheide doch im php ob Cache oder nicht.
Nutze Cache und compile ID

$this->smarty->display('Page.tpl',$this->controller->cacheId,$this->controller->compileId);

Abfr ...
  Topic: Problems with cache and compiled
mwaack

Replies: 0
Views: 4863

PostForum: General   Posted: Wed Mar 01, 2017 1:36 pm   Subject: Problems with cache and compiled
Hi all,

my problem is tha i can clear all cache/compiles but not a specific one.
(smarty 3.1.30)


$smarty->caching = true;
$smarty->cache_lifetime = 3600;
$smarty->setCompileCheck&# ...
 
Page 1 of 1
All times are GMT
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP