Recommend this page to a friend! |
Download .zip |
Info | Documentation | View files (5) | Download .zip | Reputation | Support forum | Blog (1) | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2024-04-26 (1 month ago) | Not enough user ratings | Total: 19 This week: 13 | All time: 11,230 This week: 7 |
Version | License | PHP version | Categories | |||
yii2-taggedview 1.0 | BSD License | 5 | HTML, PHP 5, Libraries, Design Patterns, S... |
Description | Author | |||
This package can set page meta and other tags in view scripts. Innovation Award
|
Extension to help setup the standard HTML meta tags besides the ones defined by Opengraph and TwitterCard to contribute to website SEO
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist daxslab/yii2-taggedview "*"
or add
"daxslab/yii2-taggedview": "*"
to the require section of your composer.json
file.
Configure the View component into the main configuration file of your application:
'components' => [
//...
'view' => [
'class' => 'daxslab\taggedview\View',
//configure some default values that will be shared by all the pages of the website
//if they are not overwritten by the page itself
'image' => 'http://domain.com/images/default-image.jpg',
],
//...
]
The component will try to set some properties by default:
$this->site_name = Yii::$app->name;
$this->url = Yii::$app->request->baseUrl;
$this->locale = Yii::$app->language;
You can overwrite the content of this tags in every page or in the component configuration.
Once the extension is configured, simply use it in your views by:
<?php
$this->title = 'page title';
$this->description = 'page description';
$this->keywords = ['keywords', 'for', 'this', 'page'];
$this->image = 'http://domain.com/images/page-image.jpg';
?>
Proudly made by Daxslab.
Files |
File | Role | Description |
---|---|---|
CHANGELOG.md | Data | Auxiliary data |
composer.json | Data | Auxiliary data |
LICENSE.md | Lic. | License text |
README.md | Doc. | Documentation |
View.php | Class | Class source |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.