N
N
Nikolai Novosad2017-09-08 01:08:18
Drupal
Nikolai Novosad, 2017-09-08 01:08:18

Output html from page to template?

Hello. The content type 'Page' has a 'body' field of type 'Long text and summary' and a widget 'Text area with a summary'. There is html inserted in which there are h2 and div tags. In page.tpl, this is displayed through Everything is displayed correctly. But now I need to insert html in which there are which have classes. After section, figure and element classes are gone. How to be now? Add more fields and display in a separate template for the page I need the value of the fields in the right place? Isn't it possible to just insert html code that will be displayed in exact match in the template? Thanks in advance! <?php print render($page['content']); ?>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Alexandrov, 2017-09-08
@BraveHeart

I re-read it a couple of times, but it's still chaotically described ...
The question is most likely in the input format, which cuts off the inserted markup. Instead of html, you can connect the "php" formatter, use it in your tasks, and then all the code will be processed / displayed as is.
Just in case, link: https://www.drupal.org/node/213156

A
andead, 2017-09-08
@andead

Set the Full HTML format in the node edit form.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question