web design, England, Britain, UK, belgium
 

How to show correct modules on ccNewsletter thank you pages - Joomla & VirtueMart Tips & How To's

How to show correct modules on ccNewsletter thank you pages. If you have different module layouts on different pages the thank you and other acknowledgement messages (subscribe, un-subscribe etc ) from ccNewsletter component won't return the correct module layout.

Home Joomla VirtueMart Tips How to show correct modules on ccNewsletter thank you pages

Wed

04

Nov

How to show correct modules on ccNewsletter thank you pages
  • Joomla 1.5
  • ccNewsletter

If you have different module layouts on different pages the thank you and other acknowledgement messages (subscribe, un-subscribe etc ) from ccNewsletter component won't return the correct module layout.
This is because the return urls are lacking an Itemid.



Joomla ccnewsletter wrong module layout We deal first with the subscription sign-up acknowledgement which is handled by the ccNewsletter Module.


First browse to a page that has the module layout that you want and note the Itemid either form the url "&Itemid=107" or from the backend Menu Manager.




Open in a text editor the file modules/mod_ccnewsletter/tmpl/default.php.
There are 3 lines to change, one for each case, Mootools, HiSlide or normal.
The line numbers are 123, 210 and 276, they are all form --> action parameters Change line 123 as below, adding the &Itemid=107:
 
<form action="<?php echo JURI::root();?>index.php?option=com_ccnewsletter&amp;view=ccnewsletter" method="post" name="subscribeFormModule" id="subscribeFormModule">
 
to
 
<form action="<?php echo JURI::root();?>index.php?option=com_ccnewsletter&amp;view=ccnewsletter&amp;Itemid=107" method="post" name="subscribeFormModule" id="subscribeFormModule">
 

And the same for the other 2 lines

Then for the subscription confirm and un-subscribe acknowledgement which is handled by the ccNewsletter Component we open file components/com_ccnewsletter/models/ccnewsletter.php and on lines 592 & 634 ( the 2 subscribe & un-subscribe function ) again add the "&Itemid=107" to the urls.
 
$unsubscribeString='<a href="'.JURI::root().'index.php?option=com_ccnewsletter&task=removeSubscriber&id='.md5($subscriberID).'">['.$unsubscribelink.']</a>';
 
to
 
$unsubscribeString='<a href="'.JURI::root().'index.php?option=com_ccnewsletter&Itemid=107&task=removeSubscriber&id='.md5($subscriberID).'">['.$unsubscribelink.']</a>';
 

All done....
Joomla ccnewsletter right module layout
Last Updated on Wednesday, 04 November 2009 12:23
 
VirtueMart
Your Cart is currently empty.



How to show correct modules on ccNewsletter thank you pages|Joomla & VirtueMart Tips & How To's



How to show correct modules on ccNewsletter thank you pages. If you have different module layouts on different pages the thank you and other acknowledgement messages (subscribe, un-subscribe etc ) from ccNewsletter component won't return the correct module layout.


ccnewsletter, itemid, subscribe, module, acknowledgement, layout, urls, return, unsubscribestring, lines, unsubscribelink, subscription, handled, component, different, layouts, confirm, adding, change, parameters, open, line, components, add, joomla, function, php, action, models, file, menu, deal, thank, sign, messages, lacking, correct, won, pages, browse

|

We use cookies to improve our website and your experience when using it. Cookies used for the essential operation of the site have already been set.
To find out more about the cookies we use and how to delete them, see our privacy policy.

I accept cookies from this site.