Results 1 to 2 of 2

Thread: Newsletter template override in contao

  1. #1
    New user
    Join Date
    08-22-17.
    Posts
    15

    Default Newsletter template override in contao

    I am using the newsletter extension. I tried overriding the template. And used this new template for the module as custom module template. The div's and classes are visible in the frontend. But in mail, the html is broken. The exact template is displayed as text.
    How can we solve this problem? Can we add template with classes and div's in that template override template itself?

  2. #2
    User Andreas's Avatar
    Join Date
    07-11-09.
    Location
    Mönchengladbach
    Posts
    484

    Default

    You should not talk about an extension, if you use the core newletter system.

    HTML for list and reader module in FE gets rendered by mod_newsletter_list and mod_newsletter_reader.

    Mail content gets rendered by mail_default.

    Values of newsletters are stored in DB tl_newsletter. You can check the content there first.

    HTML markup for the mail is optimized for as many mail clients as possible. So you can not compare mail markup with FE markup.

    In templates you can use a snippet like this to generate debug output files of template variables which you then will find in system/logs/:
    PHP Code:
    <?php

    /** DEBUG */ // remove last slash from "*/" after debugging
    $myVar $this->arrData// or $this or another variable to debug
    $myTime '-'.microtime(true);
    $logFile basename(__FILE__).'-debug'.$myTime.'.log';
    $debug  "\n\n".'file: '.__FILE__.' (line '.__LINE__.')'."\n\n";
    $debug .= print_r($myVartrue);
    log_message(str_replace('    ''  '$debug), $logFile);
    /** */

    ?>
    Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
    Amazon wishlist

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
  •