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

Correct spelling errors in the readme file #22

Closed
wants to merge 1 commit into from
Closed

Correct spelling errors in the readme file #22

wants to merge 1 commit into from

Conversation

rickyryden
Copy link

No description provided.

@@ -64,7 +64,7 @@ abstract class Controller extends BaseController
public function __construct()
{
# Default title
Meta::title('This is default page title to complete section title');
Meta::set('title', 'This is default page title to complete section title');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meta::title is a valid method and works as default tag to title, to complete custom section titles.

For example:

Meta::title('My Wonderfull Website');
Meta::set('title', 'Products');

Will print: Products - My Wonderfull Website

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I'm sorry! I misunderstood the meaning of "default title". I see now that I need both Meta::title and Meta::set for it to work. I thought Meta::title was a default fallback if no other title was set (using Meta::set) for a specific page.

Like this:

Meta::title('My Wonderfull Website');

Would print: My Wonderfull Website

And:

Meta::title('My Wonderfull Website');
Meta::set('title', 'Products');

Would print only Products and not use the default title at all.

My mistake! :)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you need a default title, you can set only the Meta::set('title' on BaseController that will be overwritten on each custom endpoint :)

@eusonlito eusonlito closed this Oct 19, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants