Hi Team!
I am working through the final challenge of answers (whoo whoo one more to go!) and its coming up with an error for “Add custom job card to the Jobs experience”. That being said I am not sure what I am doing wrong since I think I set up the joboverride card correctly. Would someone mind taking a look for me? My ID is 2540495 and I have pasted the code below for my override card. Thank you so much for your help!
Wilhelmina
{{> cards/card_component componentName=‘joboverride’ }}
class joboverrideCardComponent extends BaseCard[‘joboverride’] {
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.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
// tagLabel: ‘’, // The label of the displayed image
titleEventOptions: this.addDefaultEventOptions(),
subtitle: subtitle: profile.c_jobDepartment + ’ | ’ + profile.employmentType, // The sub-header text of the card
details: profile.description, // The text in the body of the card
// If the card’s details are longer than a certain character count, you can truncate the
// text. A toggle will be supplied that can show or hide the truncated text.
showMoreDetails: {
showMoreLimit: 500, // Character count limit
showMoreText: ‘Show more’, // Label when toggle will show truncated text
showLessText: ‘Show less’ // Label when toggle will hide truncated text
},
// The primary CTA of the card
CTA1: {
label: ‘Apply Now’, // The CTA’s label
iconName: ‘briefcase’, // The icon to use for the CTA
url: http://careers.turtleheadtacos.com, // 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
}
};
}
/**
- The template to render
- @returns {string}
-
@override
*/
static defaultTemplateName (config) {
return ‘cards/joboverride’;
}
}
ANSWERS.registerTemplate(
‘cards/joboverride’,
{{{read 'cards/joboverride/template' }}}
);
ANSWERS.registerComponentType(joboverrideCardComponent);