-
Notifications
You must be signed in to change notification settings - Fork 40
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
Implement way to include italicized court cases in page titles #575
Comments
@noahmanger: The title field you're referring to, does it always only contain the title and therefore should always be displayed italicized when displayed? Or are we dealing with a field that includes more than just the title of a case itself? |
The latter. So we need to be able to display a title like:
I don't know that it's possible (or desirable) to make the built-in title field a rich-text field. So one idea I had was to have an optional field that's like |
Ah, I see what you mean. Wagtail does provide a Another thought that comes to mind is that there's no easy way to discern the court case in a string of text either, right? For example, let's say the display did support formatting as is right now. How would the court case get italicized in this case? Someone going in and adding the formatting where appropriate? |
Yeah, I'm afraid there's no way to automatically detect them, given that they have such irregular names. |
That's what I was afraid of and given that notion I'm not sure even a regular expression is worth building to try and parse it out. That'd only be useful if there was some pattern to follow that would match a majority of the time. Given that, I think you're right in just changing the field to be a rich text field. That will allow someone to modify the text to be formatted properly and we'd then use that for the display. Alternatively you could have a separate field for this like you mentioned, but I'd only go down that route if we needed to preserve the original title as is (and in that case, just copy the entire title into the rich text field and format what you need to, otherwise you run into the problem of figuring out which part of the title to replace with the formatted version). |
The reason I suggested an additional field is that I'm not sure if Wagtail lets you override the page title field itself. That might need to be a plain string. Though do you see a way to do this? |
Ah right, good point on that - I'd have to look to see! |
Ok! I think I figured out a decent solution in #621 |
The standard way to write something like Citizens United v. FEC is to italicize it. When these show up in press release titles, however, we can't currently italicize them. The task here is to update the title field to allow for this sort of formatting.
My proposed solution is to modify the
title
field of thepress_release_page
models in Wagtail to allow rich text, but maybe there's a better way?The text was updated successfully, but these errors were encountered: