

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 Questions & Answers
- How to Replace null with “-” JavaScript
- How to replace “and” in a string with “&” in R?
- HTML5 meta name = “viewport” doesn't work as expected
- HTML <Meta> Tag
- How to work with “!=” or “not equals” in MySQL WHERE?
- How to create a dialog with “yes” and “no” options in JavaScript?
- How to query MongoDB with “like”?
- Deletions of “01” or “10” in binary string to make it free from “01” or “10” in C++ Program
- Python Object Comparison “is” vs “==”
- How to format number with “.” as thousand separators, and “,” as decimal separator?
- How do I replace “+”(plus sign) with SPACE in MySQL?
- What is the difference between “lang” and “type” attributes in a script tag?
- Deletions of “01” or “10” in binary string to make it free from “01” or “10" in C++?
- What are the different <meta> tags to define special meta information in HTML page?
- Header files “stdio.h” and “stdlib.h” in C
Advertisements