skeeve
skeeve

Reputation: 369

Include multiple blocks of Content in Assemble

I am migrating a web application from ASP.NET MVC to static pages using Assemble. I've been able to get pretty much everything figured out, but I'm running in to a problem with converting master pages to templates.

In the master pages I created multiple content regions, including one for css and scripts in the head, and a second region in the body for the content. I don't see a way to include multiple regions directly in handlebars so I have tried using the helpers to include text. Essentially moving the header text in to included files.

I found references to {{glob}} and {{include}} on the helpers pages. But they don't seem to be implemented. I looked in the helper library and couldn't find them there either.

I tried using {{include filename}}, but I get the message: "Warning: Missing helper: 'include' Use --force to continue."

I tried using {{glob filename}} but I get the message : "Warning: undefined is not a function Use --force to continue."

I did the same thing using {{md filename}} and {{embed filename}} and they both work, but not quite what I needed.

If there's a better way to do this, or you could give me a fix I'd appreciate it.

Upvotes: 1

Views: 1420

Answers (1)

doowb
doowb

Reputation: 3372

@skeeve check out the answer posted here

We have some new layout helpers that would be useful. I also have a .net background and this was something I was looking for in Handlebars when I first started with it too. Just remember that your layout when using these helpers needs to be included in the assemble options as a partial for it to work properly.

We're working on cleaning up documentation so we don't have this type of confusion in the future.

Upvotes: 1

Related Questions