Using snippets inside snippets

QUESTION: Can I use a snippet inside a snippet?

Snippet 1 (path: snippets/Reminder Templates/Reminder 1 nl-BE.html)

<p>Some text</p>
<article source="snippets/ReminderLines.html"></article>
<p>Some more text</p>

Snippet 2 (path: snippets/ReminderLines.html)

&nbsp; 
<table id="ReminderLines" data-detail="" data-hide-when-empty="" data-expander="2019">
...
</table>

If I use snippet 2 directly in a section like this, it works fine.

<p>some text</p>
<article source="snippets/ReminderLines.html"></article>
<p>Some more text</p>

However if I use snippet 1 in a section like this, the paragraphs from snippet 1 are shown, but the table from (sub)snippet 2 is not.

<article source="snippets/Reminder Templates/Reminder1 nl-BE.html"></article>

How can I make this work?
Thanks!

PS
The issue is not because snippet 2 contains a dynamic table. If I put just a paragraph of text in snippet 2 it doesn’t work either.

Can you let us know please in what kind of scenario you would like to add a HTML Snippet to another HTML Snippet?

The reason why I am asking this is because this is unfortunately not possible.

When inserting a HTML Snippet in a Print Context Section you have the option to insert it as Shared Content. This option is not available when inserting a HTML Snippet in another HTML Snippet.

screenshot_insert-snippet-window_20230920

Scenario:

I have 72 snippets, each containing a different text. They will most likely be remote snippets. For each document in the datamapper one of these 72 snippets will be loaded into my section with loadhtml.

In most of these snippets a couple of tables and some accompanying text has to be inserted. Since these tables and the text are always the same (although the data in the tables depends on the data of course), I have put those in snippet 2 which makes maintenance a breeze and which avoids them being altered by whoever alters the remote snippets.

If I could use snippet 2 inside the 68 remote snippets (as said, the tables don’t go in each of the 72 snippets) as I showed in my original question under “Snippet 1” that would make this whole setup plain and simple. Just load the right remote snippet and that’s it.

Workaround:

The workaround I have used now is far more complex:
The part of the 72 snippets before the table is always unique. The part after the tables is not. There are like 16 versions. So, now I have made 88 remote snippets (72 + 16)
In my section I have

<p id="Salutation"></p>
<article id="RemHeader"></article>
<article id="RemTable"></article>
<article id="RemFooter"></article>

And I have a Standard Script with selector article#RemHeader that first assembles a snippet name for the part of the letter before the table, based on a whole list of data fields and then loads it

var snippet = loadhtml(templateName);
if (snippet) {
    results.replaceWith(snippet);
} else {
    logger.error('template ' + templateName + ' does not exist');
}

Then I assemble the name of the table snippet and load that too. The line with results.replaceWith(snippet) is now replace however by

query('article#RemTable').replaceWith(snippet);

And lastly I do something similar for the third part of the letter.

It works this way, but my first idea was so much easier!