Invenzzia »

Pages: [1]   Go Down
  Print  
Author Topic: OPT: String concatenation in OPT v1.1.5 ?  (Read 1958 times)
0 Members and 1 Guest are viewing this topic.
wimg
User

Offline Offline

Posts: 6


View Profile
« on: June 10, 2008, 10:58:28 »

Is there any way to concatenate strings in OPT ? We'd like to truncate 2 variables like this :

{truncate($var1 . ' just a text ' . $var2, 25, '...'}

This doesn't work, neither with a dot (.) or a plus (+)
Logged
hash
User

Offline Offline

Posts: 20


View Profile WWW
« Reply #1 on: June 10, 2008, 11:19:22 »

Use '~':
Code:
{truncate($var1~'just a text'~$var2, 25, '...')}
I`m not sure if it will works, but in OPTv2 for concatenate string is using '~' so I thing the same is in OPT.
« Last Edit: June 10, 2008, 11:30:08 by hash » Logged
eXtreme
Invenzzia
Administrator
User
*****
Offline Offline

Posts: 129

Jacek Jędrzejewski


View Profile WWW
« Reply #2 on: June 10, 2008, 13:15:07 »

No, '~' is only in OPTv2.
In OPTv1 you must use two colons '::'

{truncate($var1::'just a text'::$var2, 25, '...')}
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Subject Started by Replies Views Last post
OPTv2: OPT 2.1 - ideas and proposals Zyx 0 959 Last post March 14, 2009, 22:57:23
by Zyx
OPTv2-dev7 - inicjowanie tablicą megaweb 10 3061 Last post August 23, 2008, 14:35:02
by Zyx
OPTv2: Znak   zamieniany na krzaczki. mrKrecik 12 4730 Last post November 19, 2010, 08:11:24
by Zyx
OPTv2: Wyciąganie tekstu z tagu cyrylas 4 521 Last post February 12, 2010, 09:02:04
by cyrylas
OPTv2: opt:include bartg 3 1238 Last post April 27, 2008, 14:42:09
by Zyx