承接 lemonmind/pimcore-simple-seo-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lemonmind/pimcore-simple-seo-bundle

最新稳定版本:1.0.0

Composer 安装命令:

composer require lemonmind/pimcore-simple-seo-bundle

包简介

Simple seo bundle for Pimcore

README 文档

README

Seo package that allows you to complete metadata very quickly

Installation

composer require lemonmind/pimcore-simple-seo-bundle

in the config/bundles.php file add

return [
    // another bundles
    Leogout\Bundle\SeoBundle\LeogoutSeoBundle::class => ['all' => true],
    Lemonmind\PimcoreSimpleSeoBundle\LemonMindPimcoreSimpleSeoBundle::class => ['all' => true],
];

in the config/config.yaml file add

Basic configuration

leogout_seo:
    general: ~
    basic: ~
    og: ~
    twitter: ~

lemon_mind_pimcore_simple_seo: ~

Meta image thumbnail

lemon_mind_pimcore_simple_seo:
    thumbnail_name: 'simple_thumb_name'

Title pattern

lemon_mind_pimcore_simple_seo:
    title_pattern:
        before: 'Content before seo title'
        after: 'content after seo title'

Usage

in base template add

<head>
    {{ leogout_seo() }}
</head>

Document

Just complete the fields in the SEO section and create (optional) a custom property named meta_tag_image with the asset for the document

in controller add

public function defaultAction(DocumentSeoMetaGenerator $seoMetaGenerator): Response
{
    $seoMetaGenerator->generate($this->document);

    return $this->render('default/default.html.twig');
}

Object

An interface should be added to the object definition \Lemonmind\PimcoreSimpleSeoBundle\Model\ObjectSeoInterface

Then, according to the interface(\Lemonmind\PimcoreSimpleSeoBundle\Model\ObjectSeoInterface), create the necessary fields

  • seoTitle (text->input)
  • seoDescription (text->textarea)
  • seoKeywords (text->input)
  • seoImage (media->image)

in controller

public function seoObjectAction(ObjectSeoMetaGenerator $seoMetaGenerator): Response
{
    /**
     * @var ObjectSeoInterface $test
     */
    $test = Test::getById(1);
    $url = 'absolute url to this object';

    $seoMetaGenerator->generate($test, $url);

    return $this->render('default/default.html.twig');
}

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2023-02-13