which they are the files that control a campaign web version?

jera

Member
Hello everyone

I wish to add a top bar in an email campaign, with share options, but that I want to know what are the files that control the web version of the email.

I hope you can help me with this.

Thank you.

Greetings.
 
Hello and thank you very much for your prompt response, I have a question, if I wanted to add an element of html type, either a div or h1, etc. And I want that item is added to all html files generated in campaigns where did you add? :D
 
Well,

Currently, the actionWeb_version method in the controller echoes the campaign content, so it's:
PHP:
public function actionWeb_version($campaign_uid, $subscriber_uid = null)
    {
       [...]
        echo $emailContent;
    }
You could make it something like:
PHP:
public function actionWeb_version($campaign_uid, $subscriber_uid = null)
    {
       [...]
        $myContent = '<div id="share-widgets">lots of html</div>';
        
        // parse the html
        if (!CommonHelper::functionExists('qp')) {
            require_once(Yii::getPathOfAlias('common.vendors.QueryPath.src.QueryPath') . '/QueryPath.php');
        }
        $query = qp($emailContent, 'body', array(
                'ignore_parser_warnings'    => true,
                'convert_to_encoding'       => Yii::app()->charset,
                'convert_from_encoding'     => Yii::app()->charset,
                'use_parser'                => 'html',
         ));  
        // http://api.querypath.org/docs/class_query_path.html#a01c2fc8e3d0725854fcd01f3c5972a5f
        $query->prepend($myContent);
        $emailContent = $query->top()->html();
        echo $emailContent;
    }
 
Back
Top