title: ModX - Output depending on id of the resousce and parent id
body: <p>I'm trying to output certain meta description depending on resource ID and parent ID using ModX Revo. </p>
  
  <p>The problem is that Modx filters only can operate <strong>only one</strong> special tag (or id, or parent id, or something else), for ex. </p>
  
  <pre><code>[[*id:is=`331`:then=`&lt;meta name="description" content="[[*description]] — Page [[+page]]" /&gt;`:else=`&lt;meta name="description" content="[[*description]]" /&gt;`]] 
  </code></pre>
  
  <p>In this case tag is <strong>ID</strong>. In my situation I need to add to this condition one more statement, it must work like:</p>
  
  <ul>
  <li>if [[*id]] is 331 then... </li>
  <li>else if [[*parent]] is 321 then..  </li>
  <li>else...</li>
  </ul>
  
  <p>How can I do this without creating templates or chunks?
  I tried some variants:</p>
  
  <p>This just doesn't work</p>
  
  <pre><code>[[*id:is=`331`:then=`&lt;meta name="description" content="[[*description]] — Page [[+page]]" /&gt;`:else=`[[*parent:is=`321`:then=`&lt;meta name="description" content="[[*description]] - News Page" /&gt;`:else=`&lt;meta name="description" content="[[*description]]" /&gt;`]]]] 
  </code></pre>
  
  <p>OR</p>
  
  <p>This on the 331st resource outputs two descriptions</p>
  
  <pre><code>[[*id:is=`331`:then=`&lt;meta name="description" content="[[*description]] — Page [[+page]]" /&gt;`:else=``]] 
  [[*parent:is=`321`:then=`&lt;meta name="description" content="[[*description]] - News Page" /&gt;`:else=`&lt;meta name="description" content="[[*description]]" /&gt;`]]
  </code></pre>