Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
Tagged: 8.2.6, view all, view list action
- This topic has 3 replies, 2 voices, and was last updated 11 years, 3 months ago by
Steven Zahm.
-
AuthorPosts
-
05/05/2015 at 12:40 am #333427
Kasper Tikjøb Andersen
ParticipantHi,
on the connection page I want to use Icons instead of simple links,for example: All Persons, View All, Go back to directory, vCard etc.
I want to override functions with child theme template under functions.php file,
In the following file under cnTemplatePart class need override some functions.
File Name: class.template-parts.php
It would be better if you guys give me an example for the following function.
function listActions(){... }...How do I override this function using my child theme function. Example for the out put of link of View All is the follow the below code
$out .= sprintf( PHP_EOL . "\t" . '%1$s<%2$s class="cn-list-action-item">%3$s</%2$s>%4$s', .......I want replace the with the following code
$out .= sprintf( '%1$s<span style="font-size:18px;border:1px solid #ccc;color:#0066cc;padding:4px"> <span style="font-size:18px;border:1px solid #ccc;color:#0066cc;padding:4px"> %4$s', .....Thanks
Ehsan-
This topic was modified 11 years, 3 months ago by
Kasper Tikjøb Andersen.
-
This topic was modified 11 years, 3 months ago by
Kasper Tikjøb Andersen.
05/05/2015 at 1:39 am #333430Kasper Tikjøb Andersen
Participant[Resolved]
05/05/2015 at 5:06 am #333432Kasper Tikjøb Andersen
ParticipantResolved the Override function issues, but one problem is, now the output is showing double, I used remove_action() function but it doesn’t work
05/05/2015 at 1:30 pm #333471Steven Zahm
Keymaster@ Kasper
Here's how you would remove the default action and add your own: add_action( 'plugins_loaded', 'cn_remove_actions' ); function cn_remove_actions() { remove_action( 'cn_list_action-view_all', array( 'cnTemplatePart', 'listAction_ViewAll' ) ); } add_action( 'cn_list_action-view_all', 'cn_view_all_link' ); function cn_view_all_link() { echo '<span style="font-size:18px;border:1px solid #ccc;color:#0066cc;padding:4px"><a href="#">View All</a></span>'; }Tweak as desired.
-
This topic was modified 11 years, 3 months ago by
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
