Hi
I am getting a “Add a new card called communitystory and update data mappings” error. I Attached a screenshot of the comuunitystory card.
Can someone help me with this?
Hi
I am getting a “Add a new card called communitystory and update data mappings” error. I Attached a screenshot of the comuunitystory card.
Can someone help me with this?
Hi Jeff,
Welcome to the Community and congrats on your first post!
We took a look at your account and see two possible errors causing the issue under CTA1.
Based on the instructions you want the label to be hardcoded and only be ‘Learn More’. Like so:
CTA1: {
label: 'Learn More', // The CTA's label
iconName: 'chevron', // The icon to use for the CTA
url: profile.landingPageUrl, // The URL a user will be directed to when clicking
target: '_top', // Where the new URL will be opened
eventType: 'CTA_CLICK', // Type of Analytics event fired when clicking the CTA
eventOptions: this.addDefaultEventOptions(),
// ariaLabel: '', // Accessible text providing a descriptive label for the CTA
}
As it stands currently, it is checking the Primary CTA label in KG and then if null, it would return “Learn More”.
Second, for your url, you don’t want the value to be ‘landingPageUrl’, you’ll want to reference the field. To do this, set it to profile.landingPageUrl
as done so above.
Let me know if that solves and if you have any further questions!
Best,
Alyssa
Thanks so much Alyssa! Yes, that worked!
I am having trouble on this as well. I think my problem may be with the showMoreLimit though.
{{> cards/card_component componentName=‘communitystory’ }}
class communitystoryCardComponent extends BaseCard[‘communitystory’] {
constructor(config = {}, systemConfig = {}) {
super(config, systemConfig);
}
/**
This returns an object that will be called card
in the template. Put all mapping logic here.
@param profile profile of the entity in the card
*/
dataForRender(profile) {
return {
title: profile.name, // The header text of the card
url: profile.website || profile.landingPageUrl, // If the card title is a clickable link, set URL here
target: ‘_top’, // If the title’s URL should open in a new tab, etc.
// image: ‘’, // The URL of the image to display on the card
// altText: ‘’, // The alternate text for the image
titleEventOptions: this.addDefaultEventOptions(),
subtitle: 'In partnership with: ’ + Formatter.joinList(profile.c_localNonProfits), // The sub-header text of the card
details: profile.description, // The text in the body of the card
// The primary CTA of the card
CTA1: {
label: ‘Learn More’, // The CTA’s label
iconName: ‘chevron’, // The icon to use for the CTA
url: profile.landingPageUrl, // The URL a user will be directed to when clicking
target: ‘_top’, // Where the new URL will be opened
eventType: ‘CTA_CLICK’, // Type of Analytics event fired when clicking the CTA
eventOptions: this.addDefaultEventOptions(),
// ariaLabel: ‘’, // Accessible text providing a descriptive label for the CTA
},
},
feedback: false, // Shows thumbs up/down buttons to provide feedback on the result card
feedbackTextOnSubmission: ‘Thanks!’, // Text to display after a thumbs up/down is clicked
positiveFeedbackSrText: ‘This answered my question’, // Screen reader only text for thumbs-up
negativeFeedbackSrText: ‘This did not answer my question’ // Screen reader only text for thumbs-down
};
}
/**
ANSWERS.registerTemplate(
‘cards/communitystory’,
{{{stringifyPartial (read ‘cards/communitystory/template’) }}}
);
ANSWERS.registerComponentType(communitystoryCardComponent);
Hi Keith,
We took a look at your account and it seems like there are errors in two spots - one in community story and one in the help.json.
For the community story, it seems like instead of forking the “standard” card, you forked the “document-standard” card. The standard card will automatically have the showMore fields that you need. To fix this, you can go to Jambo Commands and add a new card (picking “standard” this time) and then follow the steps to update the necessary fields.
For the help.json file, I believe you just need to update the vertical label to “Help Articles” which is currently commented out.
Let me know if you still have any issues after that!
Thanks,
Alyssa