I have a layout template, we'll call that Template A that is extended by another template, we'll call that Template B that includes another template, we'll call that Template C that includes another template lets call that Template D
So the visually it goes like so:
-Template A
--Template B
---Template C
----Template D
In Template C I define some content such as "Hello World" as well as a bunch of other content.
I do not want Template C to output the "Hello World" content but instead want Template D to decide where it is output as defined in Template C
I'm thinking that somewhere i might should use embed rather than include but i'm a bit hazy on exactly how to achieve this. Any help would be greatly appreciated.
NOTE: The content defined in Template C is defined after Template C includes Template D and also the content that is defined is not just a simple string as indicated above "hello world" but actually much more complex data.
UPDATE: Here is an example of the templates to help better understand the question.
Template C:
{% for block in entry.body.level(1) %}
{% include 'Template D' %}
{% if block.children is not empty %}
{% block child %}
{% for block in block.children %}
{% include 'Template E' %}
{% endfor %}
{% endblock %}
{% endif %}
{% endfor %}
Where Template E is the "Hello World" content mentioned above.
Template D:
{% if block.slide|length %}
<div class="stuff">
<ul class="somestuff">
{% for background in block.slide %}
<li style="background-image:url({{ background.url() }})"></li>
{% endfor %}
</ul>
</div>
<section id="text-slider">
<div class="container">
{% block child %}{% endblock %}
</div>
</section>
{% endif %}
And more code also after that endif. Where Block Child (in Template C) is the content to be defined and Block Child (in Template D) is where i want it output.