Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DXA choose to display description (if available) over title/name field - Hardcoded in code #16

Closed
vikaskumar185 opened this issue Feb 16, 2016 · 6 comments
Milestone

Comments

@vikaskumar185
Copy link

I see DXA code displaying description field value of a keyword component if it is available and not its name, I know its a best practice though have curiosity to know more.

What I see in the code here is that it is hard coded to choose description (if available) over title/name field.
But as also mentioned as comment in the code:

// TODO TSI-811: Keyword mapping should also be generic rather than hard-coded like below

string displayText = String.IsNullOrEmpty(keyword.Description) ? keyword.Title : keyword.Description;

How and when are we planning to have this ?

This has also been raised in stack exchange here.

@rpannekoek
Copy link
Contributor

Please use StackExchange for questions and create Issues here for concrete bugs or Enhancement Requests. Assuming your question is actually an Enhancement Request in disguise: can you explain why the current behavior is not sufficient for you?

@vikaskumar185 vikaskumar185 changed the title Any plans to have more flexibility to displayText of a keyword component in DXA? DXA choose to display description (if available) over title/name field - Hradcoded in code Feb 16, 2016
@vikaskumar185 vikaskumar185 changed the title DXA choose to display description (if available) over title/name field - Hradcoded in code DXA choose to display description (if available) over title/name field - Hardcoded in code Feb 16, 2016
@vikaskumar185
Copy link
Author

HI Rick,

Changed the title to make it more concrete. Indeed it may fall under Enhancement. I dint know where to set that as label to this issue.

The reason why i raised this is as follow:
A customer recently raised a request where they wanted to show Title even if they have Description in place in a Keyword component. Because they wanted to use that description to indicate only the company name who had acquired them recently to differentiate between old and new categories.

@rpannekoek
Copy link
Contributor

Sounds to me that customer is abusing the Keyword Description for what should have been done in Keyword metadata? For clarity: we indeed have a story on the DXA backlog to make the Keyword mapping logic more generic and powerful. It is currently not scoped to a release yet. If people come up with good use cases, we will prioritize the story accordingly, but this doesn't sound like a convincing use case to me...

@vikaskumar185
Copy link
Author

I completely agree. As i also mentioned in my question, I was more curious to understand whats in pipeline for this and as you said we indeed should look for better use case. Thanks for insights.

@rpannekoek rpannekoek added this to the V1.7 milestone Sep 9, 2016
@rpannekoek
Copy link
Contributor

TSI-811 (internal issue ID for tracking purposes)

@rpannekoek
Copy link
Contributor

Fixed in DXA 1.7: introduced new class KeywordModel which allows access to all CM Keyword properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants