Zombiezach8
Zombiezach8
FFilament
Created by Zombiezach8 on 9/3/2024 in #❓┊help
SimplePage render custom view data?
Hello, I'm trying to create a SimplePage that non-logged in users can view. I'm just having a issue where the data set in
getViewData()
getViewData()
or a custom
render()
render()
function is not showing up to the view? I've tried ovewriting the following and everything works except passing in data. I even tried just putting the data manually where $this->getViewData() is. I know I can use $this->variableName but I'd really not like to do that since people can see that data right? I just want to render some data.
public function render(): View
{
return view(self::$view, $this->getViewData())
->layout(self::$layout, [
'livewire' => $this,
'maxContentWidth' => 'full',
...[],
]);
}
public function render(): View
{
return view(self::$view, $this->getViewData())
->layout(self::$layout, [
'livewire' => $this,
'maxContentWidth' => 'full',
...[],
]);
}
TDLR: Passing data to render() is not working but manually entering the data variables in mount() works.
4 replies
FFilament
Created by Zombiezach8 on 8/4/2024 in #❓┊help
SimplePage not using a Panel for Render Hooks/Colors
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
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.
7 replies
FFilament
Created by Zombiezach8 on 6/11/2024 in #❓┊help
Best way for dynamic-like pages?
Hey all, I'm just trying to setup some dynamic pages but with an option to keep the filament top navbar. I tried the following but it seems to strip away all of filament and just render the entire page with that view.
render() on a item from getPages()
render() on a item from getPages()
I currently have a custom page model which has a html attribute which I am rendering manually and using RenderHooks to show my custom header and footer on filament which is working well except I cannot find a way for custom pages to keep OR disable the filament navbar. Would be helpful if someone can point me in the right direction! Desired Result:
MyHeader <- done
Filament
CustomPageContent <- not done, cannot get filament to stay on render
EndFilament
MyFooter <- done
MyHeader <- done
Filament
CustomPageContent <- not done, cannot get filament to stay on render
EndFilament
MyFooter <- done
2 replies