CakePHP 2 1 3 SEO Meta Descriptions for individual pages vs default ctp

0 votes

My default.ctp which is located in \app\View\Layouts  contains my meta descriptions and keywords. I'm adding new pages to my site and would like to be able to customize the meta description and keywords just for these specific pages. Is there code that I can add to the individual .ctp files located in app\View\Pages that would then override the meta descriptions found in default.ctp?

Mar 13, 2022 in Digital Marketing by Kichu
• 19,040 points
470 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
Google will tend to prefer page contents over meta descriptions more often in case of the description duplicates on many pages, however, there doesn't necessarily have to be a correlation of course.

startIfEmpty() was introduced with CakePHP 2.3, in earlier versions, it would be necessary to test for an existing block manually, something like for example:

$description = $this->fetch('description');
if(empty($description)) {
    echo $this->Html->meta('description', 'Default description');
}
echo $description;

Specific page template
$this->assign('description', $this->Html->meta('description', 'Specific description'));
answered Mar 15, 2022 by narikkadan
• 63,600 points

edited Mar 5

Related Questions In Digital Marketing

0 votes
0 answers

Angular 2 and SEO meta tags

i need to add met tags to ...READ MORE

Mar 6, 2022 in Digital Marketing by Kichu
• 19,040 points
532 views
0 votes
0 answers

SEO URL for information pages in opencart not working

I'm trying to create custom SEO URL's ...READ MORE

Mar 8, 2022 in Digital Marketing by Kichu
• 19,040 points
990 views
0 votes
0 answers

Replace tags with space in PHP for SEO Meta Description

I am trying to strip tags from ...READ MORE

Mar 12, 2022 in Digital Marketing by Kichu
• 19,040 points
682 views
0 votes
0 answers

Replace tags with space in PHP for SEO Meta Description

I am trying to strip tags from ...READ MORE

Mar 13, 2022 in Digital Marketing by Kichu
• 19,040 points
744 views
0 votes
1 answer

Where can I obtain a list of User Agents for SEO bots?

add crawler user agents and that would ...READ MORE

answered Mar 1, 2022 in Digital Marketing by narikkadan
• 63,600 points
1,419 views
0 votes
1 answer

How to over-ride meta data in Wordpress, using Squirrly SEO

if (is_archive()){ add_filter('sq_title', 'filter_product_wpseo_metadesc'); function filter_product_wpseo_metadesc($wpseo_metadesc){ ...READ MORE

answered Mar 1, 2022 in Digital Marketing by narikkadan
• 63,600 points
981 views
0 votes
0 answers

SEO friendly url using php

I wanted to use php to make ...READ MORE

Feb 18, 2022 in Others by Kichu
• 19,040 points
1,016 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
11,047 views
0 votes
1 answer

Vertically centering text in a div

Try this code: .smallUnitBox { ...READ MORE

answered Sep 3, 2018 in Blockchain by digger
• 26,740 points
1,026 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP