rjcuser
2011-07-21 12:58:07
Hi
Is there any reason why the code copied from the Newsletter panel wouldn't work if I pasted it in to the footer?
Thanks
Cheers
Richard
Tony Barnes
2011-07-22 08:46:59
/templates/yourtemplate/panels/SideNewsletterBox.html is 'driven' by includes/display/SideNewsletterBox.php - so the footer isn't going to generate teh correct globals (only 1 actually made by the looks of it).
Copy the contents of includes/display/SideNewsletterBox.php in includes/display/Footer.php
if (!GetConfig('ShowMailingListInvite')) {
$this->DontDisplay = true;
return;
}
$output = "";
$GLOBALS['SNIPPETS']['SideNewsletterBox'] = $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet("DefaultNewsletterSubscriptionForm");
and you should be ok
rjcuser
2011-07-23 06:45:26
Thanks very much, much appreciated.
Cheers
Richard
I've tried this but it's not working. I've added the above line to the file "footer.php". But I'm not if I put them into the right place. Would you please advice me where to put these codes on.
Thank you.
Tony Barnes
2012-01-17 12:54:40
Drop it in immediately after
public function SetPanelSettings()
{
and you should be up and running :D
Thank you, Tony. But it's still not working. I'm running V.6.0.14. Is there anything else I should do? What I did was putting the below code into the file "Footer.html" in my template folder (..default/Panels/Footer.html). And did just what you explained by adding the code to Footer.php in ../includes/display.
%%Panel.SideNewsletterBox%%
Would you please help me out? Thank you so much.
Tony Barnes
2012-01-19 09:51:43
Ah sorry - if you look back to the first question the OP was asking why copying the code from the SideNewsletterBox.html into Footer.html didn't work - so rather than using %%Panel.SideNewsletterBox%% in Footer.html, actually copy/paste the contents of SideNewsletterBox.html into your Footer.html wherever you want the box to appear.
Note that if you do this, there can only be 1 newsletter sign up position - i.e. not in the footer and in a side panel - as having 2 will make the JS fail on one of them, so the form won't submit correctly.