#SimplePage not using a Panel for Render Hooks/Colors

7 messages · Page 1 of 1 (latest)

normal quiver
#

Hello,

I'm trying to create a simple page that mimics the Login page but for the 2FA code. Is it possible to have it use my panel? I tried using Filament::setCurrentPanel but it still doesn't use my render hooks OR colors.

I'd use a regular page but I need this page to be for unauthenticated users because they aren't logged in until the 2FA is confirmed.

fluid citrusBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

normal quiver
#

SimplePage not using a Panel for Render Hooks/Colors

ashen lantern
#

What render hooks and colors did you define?

normal quiver
#

The color is just a blue that matches my website, I've already tried doing the trick for putting something in AppServiceProvider which works but doesn't fix the render hook. The render hook just adds my website global theme/footer which works great. Is it possible to have my hooks run on a specific route? I noticed if I forced the hooks to run on every route instead of my filament panel it worked

ashen lantern
#

I noticed if I forced the hooks to run on every route instead of my filament panel it worked
How did you "force" that?

Please share some code. Otherwise this is just guessing

normal quiver
#

I'm doing FilamentView::registerRenderHook( PanelsRenderHook::BODY_START, fn (): View => view('layouts.header'), ); inside my RenderHooks.php middleware. I only load this from my $panel->middleware([]) . If I load this middleware for all routes instead of only for my PanelProvider it decides to load the hooks correctly for the SimplePage.