Problem/Motivation

It would be super helpful to be able add a custom template to the theme to override the markup.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#4 use_template-3207090-4.patch1.88 KBliquidcms

Comments

kclarkson created an issue. See original summary.

kevinquillen’s picture

This looks to be not possible given how it is implemented as inline_templates. Can this be redone into theme hooks?

liquidcms’s picture

Yes, interested in this as well and surprised this isnt already a template. I went looking and saw pages.inc has a template preprocess function and there is a template file: sitewide-alert.html.twig; but neither of these seem to have anything to do with the actual alert. And then template states: * This template is used when viewing Sitewide Alert pages. But what is that? There are no alert pages. And i don't think the page.inc file is ever loaded.

liquidcms’s picture

Status: Active » Needs review
StatusFileSize
new1.88 KB

This isn't perfect as some of the markup for the alert message is hard coded in js. There is likely a templating function to use for that.

This does make use of the already existing twig template though (looks like it was WIP?) and also passes in entity variables such as extra fields or properties like ID.

chrissnyder’s picture

This will also allow us to implement templates per alert type.

chrissnyder’s picture

Status: Needs review » Fixed

  • chrissnyder authored 745d64f on 2.x
    Issue #3207090 by liquidcms, kclarkson, chrissnyder: Custom Template...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.