Skip to content

Unable to set page title #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
CallumBee opened this issue May 10, 2025 · 0 comments
Open

Unable to set page title #56

CallumBee opened this issue May 10, 2025 · 0 comments

Comments

@CallumBee
Copy link

After trawling though Volt, Livewire and Folio docs I found what i thought was the answer to this but none of these seem to work!

So tried using:

public function rendering(View $view): void
{
     $view->title('Login');
}

But throws an error about not being able to find the $title variable.

then i moved onto:

use Livewire\Attributes\Title;
use Livewire\Component;
 
#[Title('Login')] 
new class extends Component...

That throws an error about unexpected new.

so moved onto:

use Livewire\Attributes\Title;
use Livewire\Component;
 
 
new #[Title('Login')] class extends Component...

That again throws an error about not being able to find the $title variable.

So I moved onto using:

use function Livewire\Volt\{title};
...
title('Login');

Again throws an error about not being able to find the $title variable.

I reset the caches each time I am stumped to what is going on. Has anyone had success with any of these or a way to add the page title?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant