Jump to content

Recommended Posts

Posted

Hi,

I'm using PageTableExtended to give my customer the ability to build modular newsletters in the backend. 

Historically, I use TemplateTwigReplace in my templates.

I'm also using a custom Twig Filter to fix some markup issues.

Works like a charm, except for one thing: When I save an edited section in the PageTableExtended Admin View, the "edit"-layer closes, but the changes won't become visible, because I get a server error: 

Error: Exception: The filter "nl_markup" does not exist in "newsletter/nl_header.twig" at line 13

So during the ajax update on save, my custom twig filter doesn't seem to be available yet. I hooked my custom filter init to the following hook:

$this->addHookBefore('PageRender::renderPage', $this, 'nl_markup_filter');

I hope this isn't too confusing to follow along. Can someone point out a better hook to hook in?

Apparently the Twig Module doesn't come with any hooks.

Posted

solved it with this hook from InputfieldPageTableExtended:

$this->addHookBefore('InputfieldPageTableExtended::renderTable', $this, 'nl_markup_filter'); 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...