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

assign value Problem

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
Evergreen123
Smarty n00b


Joined: 16 May 2012
Posts: 4

PostPosted: Tue Aug 21, 2012 4:03 pm    Post subject: assign value Problem Reply with quote

Hallo zusammen,

ich möchte gerne einer neuen Variable einen Wert zuweisen:

{assign var="pagedata_title" value=`$conf.1``$conf.title`}

So Funktioniert das ganze. Sobald ich nun aber ein Leerzeichen oder andere Zeichen mit dazu haben möchte bekomme ich einen Compiler Fehler (syntax error: invalid attribute name)

{assign var="pagedata_title" value=`$conf.1`bla bla `$conf.title`}

Wie kann ich Variablen und statischer Text in einem Value Wert verwenden?


Danke im vorraus
Back to top
View user's profile Send private message
Rokks
Smarty Rookie


Joined: 20 Jun 2010
Posts: 16

PostPosted: Wed Sep 12, 2012 6:30 am    Post subject: Reply with quote

Versuch mal
Code:
{assign var=pagedata_title value="`$conf.1` sonst was`$conf.title`"|varvar}
Back to top
View user's profile Send private message
U.Tews
Administrator


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

PostPosted: Wed Sep 12, 2012 3:00 pm    Post subject: Reply with quote

Du must das Ganze nur in " setzen.

Code:
{assign var=pagedata_title value="`$conf.1` sonst was`$conf.title`"}
Back to top
View user's profile Send private message
Evergreen123
Smarty n00b


Joined: 16 May 2012
Posts: 4

PostPosted: Sat Sep 15, 2012 5:43 pm    Post subject: Reply with quote

Vielen Dank. Vor lauter Bäumen sieht man den Wald nicht mehr ...
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    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