Skip to content

Unable to set page title #56

Description

@CeeBeeSco

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions