|
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 |
-sensemann- Smarty n00b
Joined: 23 Mar 2013 Posts: 3
|
Posted: Sat Mar 23, 2013 4:52 pm Post subject: Erste Buchstabe groß ! |
|
|
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 |
|
Back to top |
|
Grizzly Smarty Pro
Joined: 15 Apr 2011 Posts: 172 Location: Germany
|
Posted: Mon Mar 25, 2013 10:01 am Post subject: |
|
|
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 |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Mon Mar 25, 2013 10:24 pm Post subject: |
|
|
Es müste
Code: | {$article->oxarticles__oxtitle->value|strtolower|ucwords} |
heissen |
|
Back to top |
|
-sensemann- Smarty n00b
Joined: 23 Mar 2013 Posts: 3
|
Posted: Mon Mar 25, 2013 10:41 pm Post subject: |
|
|
Das funktioniert sehr gut. Vielen Dank ! |
|
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
|