Open the custom page in a new browser tab.

How to open a custom page in Filament in a new browser tab on click? While clicking on the "view" button it is redirecting to the filament custom page and I want to load the load the filament page in to new browser tab .
<?php
//Livewire class component

class ProductsPresentationCart extends Component
{
public function viewPresentation() {
return redirect()->route('filament.admin.resources.products.view-product- presentation');

}
}
<?php
//Livewire class component

class ProductsPresentationCart extends Component
{
public function viewPresentation() {
return redirect()->route('filament.admin.resources.products.view-product- presentation');

}
}
<?php
//Filament custom page class
class ProductPresentationView extends Page
{
protected static string $resource = ProductResource::class;
protected static string $view = 'filament.resources.product-resource.pages.product-presentation-view';

protected static ?string $breadcrumb = 'Product Presentation View';
protected ?string $heading = 'Product Presentation View';

protected static ?string $navigationIcon = 'heroicon-o-clipboard-document-check';
}?>
<?php
//Filament custom page class
class ProductPresentationView extends Page
{
protected static string $resource = ProductResource::class;
protected static string $view = 'filament.resources.product-resource.pages.product-presentation-view';

protected static ?string $breadcrumb = 'Product Presentation View';
protected ?string $heading = 'Product Presentation View';

protected static ?string $navigationIcon = 'heroicon-o-clipboard-document-check';
}?>
I tried the following code in the custom page blade file .
<?php
<x-filament-panels::page target="_blank">
@livewire('Products.ProductPresentationView')
</x-filament-panels::page>
?>
<?php
<x-filament-panels::page target="_blank">
@livewire('Products.ProductPresentationView')
</x-filament-panels::page>
?>
No description
1 Reply
Eugen Pașca
Eugen Pașca2mo ago
hello, not sure where or how you have the action included, but why not use the openUrlInNewTab method or the 2nd parameter for the url method on that action?
ViewAction::make()->openUrlInNewTab(),
Action::make('custom_action')
->url(
url:route('your-route-name'),
shouldOpenInNewTab: true
),
ViewAction::make()->openUrlInNewTab(),
Action::make('custom_action')
->url(
url:route('your-route-name'),
shouldOpenInNewTab: true
),
Want results from more Discord servers?
Add your server