paulgrafx
    
            
            
                    
                                            
        
    
        I am wondering if the category and tag inputs could have extra fields added for the likes of 'meta title' and 'meta descriptions'. Mainly due to them all containing the same which could be classed as bad for seo.
Is it possible by using a binding from a boot?
    paulgrafx
    
            
            
                    
                                            
        
    
        Ignore problem sorted...
public function boot()
{
        // Extend all backend form usage
        Event::listen('backend.form.extendFields', function($widget) {
    ChadStrat
    
            
            
                    
                                            
        
    
        haha. At this point I automatically give Paul an extra day before I reply...because you're such a rockstar. Thanks for always replying back and contributing for others. It's appriciated.
    paulgrafx
    
            
            
                    
                                            
        
    
        Here is the code in full which works for me if it helps for reference....
public function boot()
{
        // Extend all backend form usage
        Event::listen('backend.form.extendFields', function($widget) {
            // Only for the Categories Controller and Category Model
            if ($widget->getController() instanceof \Radiantweb\Problog\Controllers\Categories 
                && $widget->model instanceof \Radiantweb\Problog\Models\Category) {
                // Add extra description field
                $widget->addFields([
                    'description' => [
                        'label'   => 'Meta Description Category',
                        'comment' => 'Meta Description for the individual category landing pages',
                        'type'    => 'textarea'
                    ]
                ]);
            }
            // Only for the Tags Controller and Tag Model
            if ($widget->getController() instanceof \Radiantweb\Problog\Controllers\Tags 
                && $widget->model instanceof \Radiantweb\Problog\Models\Tag) {
                // Ass extra description field
                $widget->addFields([
                    'description' => [
                        'label'   => 'Meta Description Tag',
                        'comment' => 'Meta Description for the individual tag landing pages',
                        'type'    => 'textarea'
                    ]
                ]);
            }
        });
}   Last updated
1-4 of 4
