Skip to content
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

[BUG]: Phalcon\Html\Helper\Title invoke - remove separator #15866

Closed
niden opened this issue Jan 19, 2022 · 1 comment · Fixed by #15867
Closed

[BUG]: Phalcon\Html\Helper\Title invoke - remove separator #15866

niden opened this issue Jan 19, 2022 · 1 comment · Fixed by #15867
Assignees
Labels
bug A bug report status: medium Medium

Comments

@niden
Copy link
Sponsor Member

niden commented Jan 19, 2022

The Title helper has the following __invoke parameters

    public function __invoke(
        string $separator = '',
        string $indent = '',
        string $delimiter = PHP_EOL
    ): Title

This works fine when one sets the title from the controller like so:

        $this
            ->tag
            ->title(' : ')
            ->set('AWESOME APP')
            ->append('Home')

which should produce a

<title>AWESOME APP : Home</title

However in the view, the call

    {{ tag.title() }}

produces

<title>AWESOME APPHome</title

because the separator is overwritten. To achieve the desired behavior the volt code has to be changed to

    {{ tag.title(' : ') }}

which forces developers to use the separator in two spots.

The signature of __invoke has to change, and the separator has to be removed

@niden niden added bug A bug report status: medium Medium labels Jan 19, 2022
@niden niden self-assigned this Jan 19, 2022
@niden niden mentioned this issue Jan 19, 2022
5 tasks
@niden niden linked a pull request Jan 19, 2022 that will close this issue
5 tasks
@niden niden added this to Working on it in Phalcon Roadmap Jan 19, 2022
@niden
Copy link
Sponsor Member Author

niden commented Jan 19, 2022

Resolved in #15867

@niden niden closed this as completed Jan 19, 2022
Phalcon Roadmap automation moved this from Working on it to Implemented Jan 19, 2022
niden added a commit to niden/phalcon that referenced this issue Jan 19, 2022
niden added a commit to phalcon/phalcon that referenced this issue Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug report status: medium Medium
Projects
Archived in project
Phalcon Roadmap
  
Implemented
Development

Successfully merging a pull request may close this issue.

1 participant