Hi Guys
Just sharing this as it might be useful to someone else!
I had the following request : - can we set a frontend menu option for a particular newsletter so that only a particular list was shown and only a particular Template .
Easy create new access level & apply to list and template - No problems.
BUT this needs to go from a e-mail address different to the default . Can we make it so the (non-default) email address appears when making a new mail?
after a few minutes of headscratching This is what I did (based on protostar template)
in template ->index.php
$sitemenu = $app->getMenu();
$activemenu = $sitemenu->getActive() ;
if($activemenu->id == '775' ){$doc->addScript('templates/' . $this->template . '/js/setacydefaultmail.js');}
- if using change 775 to your active menu item
Then create a setacydefaultmail.js file (in this case in the /js folder of my template) containing :
jQuery(document).ready(function(){
jQuery("#acym__campaign__sendsettings__from-email").val("addressforthisnewletter@email.com");
jQuery("#acym__campaign__sendsettings__reply-email").val("addressforthisnewletter@email.com");
})
change to your own email as needed
that can obviously be extended to fill in other params if needed.
If you are needing for multiple menu items then You may want to change to a switch and pass in the address as scriptoptions ..
hope someone finds this useful !