- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to replace default meta tag from “layout” with customizing meta tags in “view” with HTML?
Meta tags are used to store data about HTML documents such as who wrote it and the description of the document.
The best solution is to define default tags in the application and overwrite default parameters in view. We can do so in PHP.
Making changes in config file first −
<?php return [ ‘addemailid’ =>’ demo@example.com’, ‘descrip’=>’docdescription’ ];
Making changes in the layout −
<?php $this->registerMetaTag($app->params[‘ademailid’], ‘ademailid’); $this->registerMetaTag($app->params[‘descrip’],’ descrip’); ?>
- Related Articles
- How to replace default meta tag from “layout” with customizing meta tags in “view” with HTML?
- Disable browser caching with meta HTML tags
- How to use Meta Tag to redirect an HTML page?
- HTML Viewport meta tag for Responsive Web Design
- What are the different tags to define special meta information in HTML page?
- HTML DOM Meta Object
- Meta programming with Metaclasses in Python
- Include meta data in an HTML document
- How to remove HTML Tags with RegExp in JavaScript?
- How to match the regex meta characters in java as literal characters.
- Phonegap + Windows Phone 8 : HTML5 viewport meta & scaling issue
- How can we modify a MySQL view with CREATE OR REPLACE VIEW statement?
- HTML5 meta name = “viewport” doesn't work as expected
- Replace null values with default value in Java Map
- How to remove html tags from a string in JavaScript?
- Remove and add new HTML Tags with JavaScript?

Advertisements