Results 1 to 3 of 3

Thread: Add an existing field from one module to another

  1. #1
    New user
    Join Date
    09-22-10.
    Posts
    9

    Default 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.

  2. #2
    Experienced user
    Join Date
    06-10-09.
    Location
    Atlanta, Georgia
    Posts
    611

    Default 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.

  3. #3
    New user
    Join Date
    09-22-10.
    Posts
    9

    Default 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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •