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

Change getDisplayTitle to getTitle #128

Closed
GuySartorelli opened this issue Dec 4, 2023 · 0 comments
Closed

Change getDisplayTitle to getTitle #128

GuySartorelli opened this issue Dec 4, 2023 · 0 comments

Comments

@GuySartorelli
Copy link
Member

GuySartorelli commented Dec 4, 2023

The Title field will be used by default to view links in gridfields, for example in a report for broken or orphaned links. It is also used as the default field for displaying in other contexts.

If the user opts to not include an explicit title (such as is allowed by #20), there will be no title to distinguish what the link is.

Renaming the Title db field to something else, and renaming getDisplayTitle to getTitle will mean the default title will be displayed whenever users have opted not to include their own title.

Acceptance criteria

  • getDisplayTitle is renamed to getTitle
  • The "Display Title" is shown in the following place:
    • When a link is rendered in the front end.
    • When a link is displayed in the initial LinkField (Not the form)

Notes

  • In a future major release of framework, it might make sense to have a method on DataObject which gridfields and other contexts can call to get the title they should fall back on for displaying. This will mean it can be easily defined per model, without relying on specific db fields existing and having values.

PR

@GuySartorelli GuySartorelli changed the title Consider using a different field name for Title and change getDisplayTitle to getTitle Change getDisplayTitle to getTitle Feb 6, 2024
@emteknetnz emteknetnz assigned emteknetnz and unassigned emteknetnz Feb 7, 2024
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

3 participants