K
K
Konstantin2016-12-08 09:16:56
PHP
Konstantin, 2016-12-08 09:16:56

How to programmatically hide a block on another page in php (drupal)?

Hello!
Can you please tell me how to programmatically hide one output block on one of the pages? I am using Drupal.
That is, I have this block registered in page.tpl.php and it is displayed on all pages as it should. But one needs to be removed. How to do it? firstly I work with both Drupal and c php

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
afi13, 2016-12-08
@afi13

In the block settings, you can specify on which pages it should not be displayed without PHP.
PS And what about Smarty?)

D
Dmitry, 2016-12-09
@Astatroth

Why did you need to write a block in page.tpl.php? Create a block in the admin panel and set visibility there. And in the template you can add your region and display it there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question