<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Doesn't look like '
[node:field_project_type]
' has any real value in the if() statement.<br>
<br>
-Don-<br>
<br>
<br>
On 7/25/2014 6:36 PM, Bert Van Kets wrote:<br>
</div>
<blockquote cite="mid:53D2DBFC.4000107@gmail.com" type="cite">
<pre wrap="">Hi all,
I need to change the title of a node depending on the value of the field
field_project_type. I created a "PHP code" code field in display suite
and added the following code:
<?php if ([node:field_project_type] == 'Project') { ?>
Project [node:title]
<?php } else { ?>
[node:title]
<?php } ?>
However, I get the following error:
Parse error: syntax error, unexpected ':', expecting ']' in
/var/www/wallfish/modules/php/php.module(80) : eval()'d code on line 1
What am I doing wrong?
I can't find any correct way to get the value of that field through a token.
Thanks.
Bert
</pre>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<br>
<div class="moz-signature">-- <br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<title></title>
-Don Pickerel-<br>
Fane Software<br>
<img alt="" src="cid:part1.01030106.02080706@fane.com"
height="70" width="66"><br>
</div>
</div>
</body>
</html>