6

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!

12

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 }) %}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.