-
Notifications
You must be signed in to change notification settings - Fork 2
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
Create pattern for editing content that appears across a set of detail pages #1177
Comments
Connects #1168 |
Let's try to see if we can include custom "blocks" in the rich text editor based on the event itself, like the ecomment url. This link might help: https://docs.wagtail.org/en/latest/advanced_topics/customization/page_editing_interface.html#rich-text-html |
In our jam session, @xmedr and I contemplated a model to contain editable text that varies based on when it is and when the event takes place. # model
class EventBlurb
CONDITION_CHOICES = future, upcoming, ongoing, concluded
condition = arrayfield(charfield(choices)) # this is always OR (AND is not possible)
blurb = textfield
# template
for blurb in event blurb
for condition in condition
if condition
blurb |
@xmedr This might be helpful! https://docs.wagtail.org/en/v5.2.7/extending/rich_text_internals.html |
@hancush Thanks for that link! Through that I've found that I should be extending the draftail editor to include a new block. And this almost works. I can create a new link type and give it an aria-label, target, and href. And I was hoping that I could default the href to Do you have any ideas on making django render template variables from the database? If not, the alternative could be to have some JS on event detail pages that attaches to these ecomment links if they exist, and either changes the href, or just takes care of opening the right link itself. |
@xmedr Hm, let's pair on this one. Want to grab a time? |
E.g., public comment instructions on event detail pages
N.b., the CMS will not enable customizing information about particular events / board reports - that information should be entered into Legistar.
The text was updated successfully, but these errors were encountered: