Plugin Author
Steven
(@shazahm1hotmailcom)
Apologies for the delay in my reply!!!
The easiest way to display the certifications is to use this in you custom template:
$entry->getContentBlock( array( 'include' => 'certifications' ) );
Another way to do this would be:
$block = Content_Blocks::instance()->get( 'certifications' );
$block->useObject( $entry );
echo $block->asHTML();
I hope this helps!
ps. I have not actually tested the above code, but they should work.
Thanks for the code, I would try to have only the certification instead of all the block content. I understand this is an array and I only need to display the name or the description of the certification
Plugin Author
Steven
(@shazahm1hotmailcom)
If you wish to access the data at a more low level point you can use:
$terms = cnRetrieve::entryTerms( $entry->getId(), 'certification' );
$terms will be an array of objects.
Does that help?
Hi, I found a solution but if you have a better way to do this…
$terms = cnRetrieve::entryTerms( $entry->getId(), ‘certification’ );
$termsid = print_r(array_column($terms,’description’), true);
echo substr($termsid, 18, -2);
I’m using your team-grid-card-clean template
Plugin Author
Steven
(@shazahm1hotmailcom)
That looks fine, not sure why you are trimming, but I guess that depends on what was added to the description field.
Thanks, can I put the team-grid-card-clean template in my theme child to prevent future update plugin ?
Plugin Author
Steven
(@shazahm1hotmailcom)
Here’s a link to a document that outlines which custom template override files can be placed so they will not get overwritten in an update:
I hope this helps!
Thanks I try to apply the custom template in my child theme without issue.
I create connections-templates\card\team-grid-card-clean dir under my child dir theme with card file thats make no difference. Coul you help me ?
Plugin Author
Steven
(@shazahm1hotmailcom)
That is not a valid path. Try:
../connections-templates/block-team-grid-card-clean/card.php