Skip the setup. Our team will have you taking orders in 24 hours. Get started →
Extensions

SEO Manager

Installation Getting started Usage Integration with models Extending SEO fields Extending Open Graph fields #Installation If you haven't already bought...

If you haven't already bought the TastyIgniter SEO Manager extension, you can purchase it from the TastyIgniter Marketplace.

After purchasing the extension, add composer.tastyigniter.com as a repository in your composer.json file to allow Composer to find the package. This is done automatically when you install the extension via the TastyIgniter Admin.

"repositories": {
    "tastyigniter": {
        "type": "composer",
        "url": "https://composer.tastyigniter.com"
    }
},

Next, create a auth.json file under the same directory as your composer.json file to provide your TastyIgniter Marketplace credentials. This file should contain your email address and carte key in the following format:

{
    "http-basic": {
        "composer.tastyigniter.com": {
            "username": "your-tastyigniter-account-email-address",
            "password": "your-tastyigniter-site-carte-key"
        }
    }
}
  • username: Your TastyIgniter account email address.
  • password: Your TastyIgniter site carte key, which you can find in your TastyIgniter account under Sites.

After setting up the auth.json file, you'll be able to install the extension via composer using the following command:

composer require igniterlabs/ti-ext-seomanager -W

Run the database migrations to create the required tables:

php artisan igniter:up

From your TastyIgniter Admin, you can manage settings for SEO tags and Open Graph fields for your pages. Navigate to the Manage > Settings > SEO Configuration admin page.

You can also manage SEO tags and Open Graph fields for your theme and static pages under the Design > Themes or Design > Pages admin page. Here you can edit existing pages or create new ones, and you'll find additional tabs for SEO and Open Graph fields.

SEO tags and Open Graph tags are automatically generated and added to the head section of your pages when you provide the necessary information in the SEO and Open Graph admin form fields when creating or editing a static or theme page.

This section covers how to integrate the SEO Manager extension into your own extension if you need to create custom SEO fields or extend existing ones. The SEO Manager extension provides a simple API for managing SEO tags and Open Graph data.

SEO fields can be attached to any TastyIgniter model with single line of code. You just need to implement SEO Action in your model class like:

You can extend the SEO fields by listening to the seoManager.extendSeoFields event. This event is triggered when the SEO fields are being prepared.

This allows you to modify or add more fields to the existing SEO fields array. Here's an example of how to use this event:

Event::listen('seoManager.extendSeoFields', function (&$fields) {
    // modify or add more fields
    $fields[] = [
        'name' => 'custom_field',
        'label' => 'Custom Field',
        'type' => 'text',
        'span' => 'left',
    ];
});

You can extend the Open Graph fields by listening to the seoManager.extendOgFields event. This event is triggered when the Open Graph fields are being prepared.

This allows you to modify or add more fields to the existing Open Graph fields array. Here's an example of how to use this event:

Event::listen('seoManager.extendOgFields', function (&$fields) {
    // modify or add more fields
    $fields[] = [
        'name' => 'custom_og_field',
        'label' => 'Custom Open Graph Field',
        'type' => 'text',
        'span' => 'left',
    ];
});

Did this answer your question?

Your feedback helps us improve our help articles.

Need more help?

Explore the help center, join the community, or get priority support from the TastyIgniter team.