M
M
maiskiykot2019-08-25 18:43:57
Drupal
maiskiykot, 2019-08-25 18:43:57

How to programmatically hide a div in Drupale 7?

There was a need to hide a piece of output in the node. The problem is that this piece is displayed by Drupal as #markup and it's impossible to get close to the internal elements. Question: how to refer to elements inside $page['block']['#markup']…?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
maiskiykot, 2019-08-26
@maiskiykot

Just went through the wrong hook. It was necessary through form and not page

A
andead, 2019-08-25
@andead

$dom = filter_dom_load($markup);
Further https://www.php.net/manual/ru/book.dom.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question