I am trying to update the "Read More" link from directing to the post to directing to the "View in browser" URL. I have the "Read More" defined in /helpers/articles.php and have tried $data_email(['view_in_browser_link']
, $viewinbrowser
, just [view_in_browser_link]
, and a bunch of other combinations.
This is the original code (the one I want to change), that gets the permalink for the post and sets the href value
$content .= ' <a href="'.get_permalink($post['ID']).'" target="_blank">'.stripslashes($params['readmore']).'</a><p>'.$post['post_content'].'</p>';
I've been trying various combinations using those above three values, plus others, below is one attempt:
$content .= ' <a href="'.$view_in_browser_link.'" target="_blank" style="color:green;" id="bLink">'.stripslashes($params['readmore']).'</a><p>'.$post['post_content'].'</p>';
But they all return empty. I also tried building the VIB URL but can't get the email_id value either. The below is the function I tried (based on the one in /helpers/email.php
function setNewVIB($data_email_b){
if (!empty($_REQUEST['email_id']))
$this->email_id = (int) $_REQUEST['email_id'];
if (!is_array($data_email_b) && is_object($data_email_b))
$data_email_b = (array) $data_email_b;
$paramsurl=array(
'wysija-page'=>1,
'controller'=>'email',
'action'=>'view',
'email_id'=>$email_id //NEEDS TO FIND EMAIL_ID
);
$modelConf=WYSIJA::get('config','model');
return WYSIJA::get_permalink($modelConf->getValue('confirm_email_link'),$paramsurl);
}
I've also tried various values for 'email_id'
to no avail.
Does anyone know how to get that "view in browser link" so that I can have all of these "read more" links direct to the browser view?