Custom Views

Is it possible to get custom views without having to create new pages. I want to extend a view from another package but with filaments styling. Im trying to put my content inside:
<x-filament-panels::page.simple>

<x-filament-panels::form>
{{ $form }}

</x-filament-panels::form>


</x-filament-panels::page.simple>
<x-filament-panels::page.simple>

<x-filament-panels::form>
{{ $form }}

</x-filament-panels::form>


</x-filament-panels::page.simple>
But keep getting this error: Using $this when not in object context So not sure what template I should be using instead?
8 Replies
Jamie Cee
Jamie CeeOP13mo ago
Anyone know?
ChesterS
ChesterS13mo ago
@Jamie Cee Why do you want the .simple version and not just
<x-filament-panels::page>
<x-filament-panels::page>
Or is it a custom page on a simple resource?
Jamie Cee
Jamie CeeOP13mo ago
Dont mind which I use. I just need the styling of the page more than anything. Its not related to any classes as im overriding the namespace for the vendor view of a different package So when I keep getting
Using $this when not in object context
Using $this when not in object context
Its likely because its not coming from a class extending page or whatever, but thats because I dont want that
@php

$widgetData = $this->getWidgetData();

$subNavigation = $this->getCachedSubNavigation();

@endphp
@php

$widgetData = $this->getWidgetData();

$subNavigation = $this->getCachedSubNavigation();

@endphp
Mainly for the parts like this in the page index
ChesterS
ChesterS13mo ago
Hmm you can probably find what's missing from your class and add it manually. You still need the required interfaces probably (HasForm etc)
Jamie Cee
Jamie CeeOP13mo ago
I don't have a class for it. Basically I have a completely separate package, and I want to take the content of one of the views, but place it into a filament styled page. So I dont have a class for it, Just need the styling of a page
ChesterS
ChesterS13mo ago
Wait, I'm a bit confused. You're saying you have a blade template right? How are you using it? As in, where do you pass this? do you just include it in another template?
Jamie Cee
Jamie CeeOP13mo ago
So basically, my package has a blade template view. I am wanting to override that view, so the path will be resources/views/vendor/packagename/blade file And I want to place the content in there but with a filament styling instead of the default it currently has
ChesterS
ChesterS13mo ago
Sorry bro, I've never used filament in a package and have no idea what to expect 😦
Want results from more Discord servers?
Add your server