D
D
Dmitry2015-04-13 12:09:04
Drupal
Dmitry, 2015-04-13 12:09:04

Where is the $content variable formed in Drupal 7?

I need to fix the version in the output, but I can't find the code. There are only common blocks in the template, but I don’t know where the content for the variable is formed.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rakro, 2015-04-13
@rakro

You need to create the file node--machine_name_of_node_type.tpl.php. The $node variable will be available in this file. From it you can pull out all the attributes of the node and arrange it as you need. After creating the file, the cache needs to be cleared in Drupal.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question