- Posts: 9
- Thank you received: 0
Please post all pre-sales questions of all products on this forum
Custom Campaigns
- Nate
- Topic Author
- Offline
- New Member
Less
More
9 years 8 months ago #47611
by Nate
Custom Campaigns was created by Nate
I have a menu item of type com_jdonation » com_jdonation_donation_VIEW_DEFAULT_TITLE
In the menu item under Required Settings, I have left Choose Campaign alone, so the dropdown says select campaign. One the front end it allow users to select the campaign. imgh.org/donate/donate-to-interfaith-ministries
However, I need to create more campaigns, but do not want to show on the overall donation page, which uses this menu item.
How would I hide/show only certain campaigns for a menu item?
In the menu item under Required Settings, I have left Choose Campaign alone, so the dropdown says select campaign. One the front end it allow users to select the campaign. imgh.org/donate/donate-to-interfaith-ministries
However, I need to create more campaigns, but do not want to show on the overall donation page, which uses this menu item.
How would I hide/show only certain campaigns for a menu item?
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
9 years 8 months ago #47664
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Custom Campaigns
Hi Nate
Unfortunately, the extension doesn't have any settings to allow you to choose the campaigns you want to display with that menu item, so you will need to customize the code in this case.
Maybe you should try to look at components/com_jdonation/views/donation/view.html.php and try to customize the code?
Regards,
Tuan
Unfortunately, the extension doesn't have any settings to allow you to choose the campaigns you want to display with that menu item, so you will need to customize the code in this case.
Maybe you should try to look at components/com_jdonation/views/donation/view.html.php and try to customize the code?
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Nate
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
9 years 8 months ago #47685
by Nate
Replied by Nate on topic Custom Campaigns
How would I go about hiding certain campaign on this view?
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
9 years 8 months ago #47692
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Custom Campaigns
Hi Nate
Please get this file, unzip it and upload it to components/com_jdonation/views/donation folder of your site. The look at the code which I modified in that file (view.html.php), you will see that I added the code :
That code above will hide campaigns with ID = 1 and ID = 2 on the donation page. If you want to hide other campaigns, just modify that code to add more IDs to the array (you can understand this code easily if you know php code).
Hope that helps
Tuan
Please get this file, unzip it and upload it to components/com_jdonation/views/donation folder of your site. The look at the code which I modified in that file (view.html.php), you will see that I added the code :
Code:
$hideCampaigns = array(1, 2);
That code above will hide campaigns with ID = 1 and ID = 2 on the donation page. If you want to hide other campaigns, just modify that code to add more IDs to the array (you can understand this code easily if you know php code).
Hope that helps
Tuan
The following user(s) said Thank You: Nate
Please Log in or Create an account to join the conversation.
- Nate
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
9 years 7 months ago #47726
by Nate
Replied by Nate on topic Custom Campaigns
Worked like a charm!
That files had already been customized by joomdonation support, so I simply added the code for hide arrays and the extra bit on the $sql line.
Thanks!
That files had already been customized by joomdonation support, so I simply added the code for hide arrays and the extra bit on the $sql line.
Thanks!
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
9 years 7 months ago #47737
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Custom Campaigns
Great, Nate. Thanks for confirming that it works well.
Regards,
Tuan
Regards,
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc, Giang Dinh Truong, Mr. Dam
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.