Answers.Body: <p>It should be a string:</p>
  
  <pre><code>{% for entry in craft.entries({ section: 'news', limit: 2, id: 'not 42' }) %}
  </code></pre>
  
  <p>so concat your variable like so:</p>
  
  <pre><code>{% for entry in craft.entries({ section: 'news', limit: 2, id: 'not ' ~ this_id }) %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-08T20:02:27.803Z
Answers.LastActivityDate: 2015-04-08T20:02:27.803Z
Answers.UserDisplayName: carlcs
Body: <p>i think the following code shows the problem:</p>
  
  <pre><code>{% for entry in craft.entries({ section: 'news', limit: 2, **id: not this_id** }) %}
  </code></pre>
  
  <p>the big one doesn't work in this way. Has anyone an idea?</p>
  
  <p>The content of this_id is a number.</p>
  
  <p>Thank you! </p>
  
Tags: <entry><variable>
Title: id: 'not' with variable
ThreadText: # id: 'not' with variable
  
  (Asked by: username_0 on 2015-04-08)
  
  i think the following code shows the problem:
  
  ```
  {% for entry in craft.entries({ section: 'news', limit: 2, **id: not this_id** }) %}
  
  ```
  
  the big one doesn't work in this way. Has anyone an idea?
  
  The content of this\_id is a number.
  
  Thank you!
  
  **Tags:** entry, variable
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-04-08. Score: 12 | Accepted answer
  
  It should be a string:
  
  ```
  {% for entry in craft.entries({ section: 'news', limit: 2, id: 'not 42' }) %}
  
  ```
  
  so concat your variable like so:
  
  ```
  {% for entry in craft.entries({ section: 'news', limit: 2, id: 'not ' ~ this_id }) %}
  
  ```
  
  
  ---
  
  