Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Erste Buchstabe groß !

 
Post new topic   Reply to topic    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
-sensemann-
Smarty n00b


Joined: 23 Mar 2013
Posts: 3

PostPosted: Sat Mar 23, 2013 4:52 pm    Post subject: Erste Buchstabe groß ! Reply with quote

Hallo zusammen,

ich habe folgenden Befehl in einer php Datei:

Code:
$oSmarty->assign_by_ref( "article", $oArticle );



im template:
Code:
[{$article->oxarticles__oxtitle->value}]


kann mir jemand sagen wie ich dies in den Befehl einbaue:
Code:
(ucwords(strtolower($oArticle->oxarticles__oxtitle->value)))


dadurch soll der erste Buchstabe Groß und der Rest klein ausgegeben werden.
Oder muss ich das dann im template angeben ?

Gruß
Sensemann
Code:
Back to top
View user's profile Send private message
Grizzly
Smarty Pro


Joined: 15 Apr 2011
Posts: 108
Location: Germany

PostPosted: Mon Mar 25, 2013 10:01 am    Post subject: Reply with quote

Das kannst du auch im Template selbst machen. Im normalfall sollte es über

Code:

{$article->oxarticles__oxtitle->value|ucwords}


funktionieren, hab es aber nicht getestet, weil ich es noch nie gebraucht habe
_________________
BASE4U - Deine Meinung ist Wichtig!
Back to top
View user's profile Send private message Visit poster's website
U.Tews
Administrator


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

PostPosted: Mon Mar 25, 2013 10:24 pm    Post subject: Reply with quote

Es müste
Code:
{$article->oxarticles__oxtitle->value|strtolower|ucwords}

heissen
Back to top
View user's profile Send private message
-sensemann-
Smarty n00b


Joined: 23 Mar 2013
Posts: 3

PostPosted: Mon Mar 25, 2013 10:41 pm    Post subject: Reply with quote

Das funktioniert sehr gut. Vielen Dank !
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
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