title: Pass a variable to a content object containing a tx_news plugin
body: <p>This is very similar to my question <a href="https://stackoverflow.com/questions/67844215/counter-for-mask-elements-in-a-typo3-column/67847937">Counter for mask elements in a TYPO3 column</a></p>
  <p>I need to pass a variable (in my case, the value of <code>cObj:parentRecordNumber</code> which is the counter for the current item in it's column) to the template.</p>
  <p>In the main page template:</p>
  <pre><code>&lt;f:cObject typoscriptObjectPath=&quot;lib.content.pageteasers&quot; /&gt;
  </code></pre>
  <p>In typoscript:</p>
  <pre><code>lib.content {
      pageteasers &lt; styles.content.get
      pageteasers {
          select {
              where = colPos=2
              max = 8
          }
          // this passes the variable elementCounter to the fluid template of the rendered mask content element:
          renderObj.mask_teaser {
              variables {
                  elementCounter = TEXT
                  elementCounter.value = {cObj:parentRecordNumber}
                  elementCounter.insertData = 1
              }
          }
          // this should pass the same value to a rendered tx_news plugin: 
          variables {
                  elementCounter = TEXT
                  elementCounter.value = {cObj:parentRecordNumber}
                  elementCounter.insertData = 1
          }
          // it doesn't. what about these trial &amp; error:
          renderObj.list &lt; .variables
          renderObj.plugin.tx_news &lt; .variables
          renderObj.list.20.news_pi1 &lt; .variables
          renderObj.news_pi1 &lt; .variables
          // none of these seem to work either 
      }
   }
  </code></pre>
  <p>And then in the rendered CE template (<code>News/List.html</code>)</p>
  <pre><code>&lt;f:debug title=&quot;&quot; inline=&quot;1&quot;&gt;{_all}&lt;/f:debug&gt;
  </code></pre>
  <p>I don't manage to see the above variable in here. What is the correct way to pass the variable from TS to the news fluid template?</p>
  <hr />
  <p>PS Another try was using the Good Old Register</p>
  <pre><code>pageteasers &lt; styles.content.get
  pageteasers {
      select {
          where = colPos=2
          max = 8
      }
      append = LOAD_REGISTER
      append {
        elementCounter = TEXT
        elementCounter.value = {cObj:parentRecordNumber}
        elementCounter.insertData = 1
     }
  }
  </code></pre>
  <p>And in the template:</p>
  <pre><code>{v:variable.register.get(name: 'elementCounter')}
  </code></pre>
  <p>but that is <code>NULL</code></p>