Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

Template aus Variable und nicht aus Datei
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1389

PostPosted: Sat May 05, 2018 11:48 pm    Post subject: Reply with quote

We already told you that multiple times. But you don't want to listen or learn, you want us to write a ready solution for your specific problem for you for free.
Not going to happen.
Back to top
View user's profile Send private message
wwl
Smarty Rookie


Joined: 29 Apr 2018
Posts: 9

PostPosted: Thu May 10, 2018 12:19 pm    Post subject: Reply with quote

The problem is that i post in einem Deutschen Forum und mir wird dauern englisch geantwortet. Ich kann leider nicht so gut englisch. Und ich verstehe nicht was ihr meint. Ich habe schon alles ausprobiert. Ich sehe nur die Beispiele wie man die Daten aus der Datenbank auslesen kann. Ich hab sie aber nicht in einer Datenbank.
Christian
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1389

PostPosted: Fri May 11, 2018 12:34 pm    Post subject: Reply with quote

It does not matter where do you have the data.
You define

1. The prefix your template source would be identified by.
2. The means of retrieving the template contents as a string.

The rest is done by Smarty.
Back to top
View user's profile Send private message
Grizzly
Smarty Pro


Joined: 15 Apr 2011
Posts: 156
Location: Germany

PostPosted: Mon May 14, 2018 6:27 am    Post subject: Reply with quote

Das du immer auf Englisch antworten bekommst, stimmt ja wohl nicht. Ich habe dir immer auf deutsch geantwortet...

Aber in einem muss ich AnrDaemon Recht geben: Es spielt keine Rolle ob aus DB oder aus einem string (was ja dann sogar das gleiche ist, weil du in der Datenbank höchstwahrscheinlich auch den string speicherst) herkommt. Und - auch hier gebe ich ihm/ihr wieder recht - wir helfen dir zwar gerne weiter (zumindest spreche ich für mich) aber du kannst nicht erwarten, dass wir dir deine Lösung "entwickeln".
Back to top
View user's profile Send private message Visit poster's website
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1389

PostPosted: Wed May 16, 2018 4:09 pm    Post subject: Reply with quote

While I can understand french and german to an extent, it's easier for me to reply in English. Neither of the three is my native toungue.
You could always use one of the translation services to both improve your understanding and clear doubts of your own translation.
Back to top
View user's profile Send private message
mwaack
Smarty Rookie


Joined: 01 Mar 2017
Posts: 7

PostPosted: Fri Sep 07, 2018 8:12 pm    Post subject: Reply with quote

Versuchs mal damit:
https://www.smarty.net/docs/en/resources.string.tpl

Code:
<?php
$smarty->assign('foo','value');
$template_string = 'display {$foo} here';
$smarty->display('string:'.$template_string); // compiles for later reuse
$smarty->display('eval:'.$template_string); // compiles every time
?>
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Language: German All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
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