定制 undkonsorten/meta-tag 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

undkonsorten/meta-tag

Composer 安装命令:

composer require undkonsorten/meta-tag

包简介

Provides Fluid view helpers to set meta tags in TYPO3 CMS

README 文档

README

TYPO3 extension allowing to write your meta-tags in Fluid. Syntax is a close as possible to the HTML <meta> tag. Ships with one level of override.

Installation

Via composer

composer require undkonsorten/meta-tags

or from Github

Configuration

No configuration is needed, there‘s no TypoScript to include.

Usage

To use the view helper in your Fluid templates you have to import the namespace, e.g.:

<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
        xmlns:m="http://typo3.org/ns/Undkonsorten/MetaTag/ViewHelpers"
        data-namespace-typo3-fluid="true">

or

{namespace m=Undkonsorten\MetaTag\ViewHelpers}

Then you can use the meta view helper in any of the following forms:

<!--Tag style-->
<m:meta http-equiv="content-type" content="{settings.contentType}" />
<!--Inline style-->
{m:meta(property:'og:description',content:description)}
<!--You can omit content attribute and use tag content instead-->
<m:meta property="og:image"><f:uri.image image="{image}" width="800" height="600" absolute="1" /></m:meta>
<!--The same works for inline syntax-->
{author.fullName -> m:meta(name:'author')}

If the content is empty (i.e. only white-space characters) no meta tag is added. There‘s no need to wrap each of your meta tags in an if construct just to get rid of the empty ones.

Overriding

If for a requested meta tag there‘s a collision with an existing meta tag (same property / name / http-equiv value) then the existing one will be kept and the new one will be discarded. To change this behavior you can set override="1". Then any existing meta tag of the same type will be overridden.

That means you have a two-level hierarchy that works regardless of processing order at run time. Just define your "global" meta tag with values e.g. from pages record without override but set that flag for your more specific ones, e.g. coming from extension show actions.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2018-02-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固