F
F
Freemm2019-08-18 13:08:41
Prestashop
Freemm, 2019-08-18 13:08:41

How to exclude site category in head meta tag output php file in prestashop?

Tell me, how to exclude the category of a site with a url like sitename.com/blog/page1...99 using php in the file that is responsible for displaying page meta tags in the head? It is necessary that meta tags are not displayed on the pages of this category.
I was recommended this code:

if(parse_url($_SERVER['REQUEST_URI'])['path'] != "/blog"){
// Выводим мета-данные
}

I don't quite understand how to apply it. Where should this code be placed in the file that displays meta tags on pages?
File: https://github.com/freemman/misc/blob/master/Meta.php

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton R., 2019-08-18
@anton_reut

Place the code in the Template and not in the model or controller. Give the template code and we'll see.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question