Add an existing field from one module to another
I am running Contao 2.9.1 --
There is a Title field in the backend News module. It looks like globally it is called $GLOBALS['TL_LANG']['tl_news_archive']['title']. I would like to be able to access that value from the news articles that belong to it, and use it in the news_latest.tpl template. I see where things are being created and stored, just don't know how to bring it into the tl_news database. Thanks ever so much.
Re: Add an existing field from one module to another
If you are talking about adding the name of the archive to the template, simply add this code:
Code:
<?php echo $this->archive; ?>
To view all of the available variables, have a look at this code snippet.
Re: Add an existing field from one module to another
That's exactly what I needed -- thanks!
hmmm... that was too easy.
Also appreciate the showTemplateVars tip.