<div dir="ltr"><div style="font-family:trebuchet ms,sans-serif" class="gmail_default">Could it be​ that de field referenced is wrong?</div><div style="font-family:trebuchet ms,sans-serif" class="gmail_default"> </div><div style="font-family:trebuchet ms,sans-serif" class="gmail_default">
I am no php programmar, but in examples I see $node-&gt;field_project_type used</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-26 0:55 GMT+02:00 Don <span dir="ltr">&lt;<a href="mailto:donald@fane.com" target="_blank">donald@fane.com</a>&gt;</span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div>Doesn&#39;t look like &#39;
      [node:field_project_type]
      &#39; 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 type="cite">
      <pre>Hi all,

I need to change the title of a node depending on the value of the field
field_project_type. I created a &quot;PHP code&quot; code field in display suite
and added the following code:

&lt;?php if ([node:field_project_type] == &#39;Project&#39;) { ?&gt;
Project [node:title]
&lt;?php } else { ?&gt;
[node:title]
&lt;?php } ?&gt;

However, I get the following error:

Parse error: syntax error, unexpected &#39;:&#39;, expecting &#39;]&#39; in
/var/www/wallfish/modules/php/php.module(80) : eval()&#39;d code on line 1

What am I doing wrong?
I can&#39;t find any correct way to get the value of that field through a token.

Thanks.

Bert
</pre><span class="HOEnZb"><font color="#888888">
    </font></span></blockquote><span class="HOEnZb"><font color="#888888">
    <br>
    <br>
    <div>-- <br>
      
      <br>
      <div>-- <br>
        
        
        -Don Pickerel-<br>
        Fane Software<br>
        <img alt="" src="cid:part1.01030106.02080706@fane.com" width="66" height="70"><br>
      </div>
    </div>
  </font></span></div>

<br>--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br></blockquote></div><br></div>