Does anyone have an example of how I can accomplish this?

72 views
Skip to first unread message

JSmack

unread,
Nov 9, 2016, 12:35:03 PM11/9/16
to Nunjucks
I have the latest version of nunjucks....

Here is my conundrum and Its been killing me for days....


I have a "container component" im using throughout my page.  The content of this "container" can be injected with other "sub components"

So for example my index page: 

* header 
* container component
    |-----sub component 1
*container component
    |-----sub component 2
* footer

So my question is, is there a way to include a "sub component" in my index.html page and say that the sub component inherits the "container component"?   This way, I can place my subcomponent on any page, and if i specify that "container component" it always gets wrapped when needed ?  I'm trying to prevent creating a "container component" for every sub component.

Does nunjucks support this?

Smith Aitufe

unread,
Jul 30, 2017, 12:48:14 PM7/30/17
to Nunjucks
I want to believe you have resolved this.
If not and you are still interested, we can talk more about it
Reply all
Reply to author
Forward
0 new messages