0
votes

I would like to render a simple plain-text or html output in my twig template ( page--front.htmltwig ).

I have this kind of HTML :

<header class="intro-header" style="background-image: url('themes/custom/tommiecrawford/images/home-bg.jpg')">
<div class="container">
    <div class="row">
        <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
            <div class="site-heading">
                {{ HERE I WANT TO RENDER SOME HTML FROM DRUPAL }}
                <hr class="small">
                <span class="subheading">A Clean Blog Theme by Start Bootstrap</span>
            </div>
        </div>
    </div>
</div>

What is the best way to create a simple html output in drupal and then render it in this twig template?

Do i need to create a custom block or something like that? And how can i render this in the template so i can make the output dynamic?

Many thanks

1

1 Answers

0
votes

Alright, i found out how the template system actually works.

You need to enable twig debug to see what template is used. In this case it was block--slogan.html.twig.

So i just need to overwrite that template in mine custom templates directory.

After that i just could use the {{ content }} method to display the block content and style it a little bit.