Open stevesmename opened 7 years ago
@stevesmename you have couple of options.
// <item>
case this.components.menuItem:
// Prepare optional target attribute for the <a> element
var target = '';
if (element.attr('target')) {
target = ' target=' + element.attr('target');
}
var alias = '';
if (element.attr('alias')) {
alias = ' alias=' + element.attr('alias');
}
var classes = ['menu-item'];
if (element.attr('class')) {
classes = classes.concat(element.attr('class').split(' '));
}
return format('<th %s class="%s"><a href="%s"%s%s>%s</a></th>', attrs, classes.join(' '), element.attr('href'), target, alias, inner);
@DerekBess thanks for the comment, I never thought of a custom helper. I don't like modifying core, or altering a contributed module without making a proper pull request. I am a fan of extending, which is my understanding what a custom helper essentially offers. When I can't go the route of using inky then I post a github issue such as this, "why I didn't use inky syntax" whenever it occurs.
I noticed your comment on another issue in the queue regarding using yaml for analytics. Thought your comment was very insightful on how to begin implementing yaml files into my development process.
@stevesmename I don't like modifying core as well, which is why I have been going the custom helper route. I'm currently in the process of writing custom script that allows you to create your own custom inky tags without modifying core node module. I'll release the code when I get more time to focus on the task.
I'm still wrapping my head around the best way to implement yaml files into my base project folder.
How can we reproduce this bug? Within Salesforce Marketing Cloud (and likely other email service providers), it's ideal to code in an alias on all links. Menu->item syntax strips out "alias" and other attributes on links.
Write out the HTML (or Inky code) that causes the issue.
What did you expect to happen?
What happened instead?