Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Multiple partials for one page ? #11

Closed
Legends opened this issue Dec 29, 2019 · 2 comments
Closed

Question: Multiple partials for one page ? #11

Legends opened this issue Dec 29, 2019 · 2 comments

Comments

@Legends
Copy link

Legends commented Dec 29, 2019

I have setup my project to use the partials plugin for loading content pages (body-xyz.html).
Now I have one layout.ejs page which requires other html templates, which in whole represent the layout page, means: this layout page is the basis for all pages.

Now I use your plugin for every html-webpack-plugin configuration to dynamically inject the respective body.html.

Unfortunately after upgrading my project to use latest beta version of the html-webpack-plugin ,
I cannot require anymore. see issue.

Now my question:
I would delete all require calls in my layout page and use your plugin to inject the respective partial I need.
I would delete this for example:
` ${require('../../partials/nav.html')} // inside of layout.ejs

Is there a way to configure multiple partials with respective location set for a certain page?

Btw. Appreciate your plugin !

@Legends
Copy link
Author

Legends commented Dec 29, 2019

This should actually be possible by defining multiple entries in settings object pointing to the same file

@Legends Legends closed this as completed Dec 29, 2019
@colbyfayock
Copy link
Owner

ah didn't realize upgrading to the latest beta is what was breaking that, should have figured, but glad to know that. I tried to take a shot at figuring this out a while back but I wasn't getting anywhere, I can another shot and see if I can find anything. maybe I can make use of the info in that linked issue, i'll follow up with any additional details in the other issue here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants