question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature proposal: Render Locally Scoped Templates

See original GitHub issue

I have started to use https://github.com/nathantreid/blaze-modules and thought that flow-router-extra could support scoped templates in it’s this.render() method.

Namely, I suggest to allow providing full template instances (and not just template names) in the layout and/or template parameters. And since there might be several templates rendered simultaneously, maybe let the ‘template’ contain multiple templates?

For example what I do now:

// routes.js
import { LayoutWebsite } from '/imports/ui/layouts/website';
import { ApiWebsiteLanding } from '/imports/api/website/landing';

...

landingPage.route('/', {
  name: 'landing',
  action(params, queryParams) {
    BlazeLayout.render(LayoutWebsite, {
      ComponentDynamic: ApiWebsiteLanding,
    });
  }
});
// website.html
<component name='LayoutWebsite'>
  <div id='layouts-website'>
    {{> SomeHeader}}
    <div id='content' >
      {{> ComponentDynamic}}
    </div>
    {{> SomeFooter}}
  </div>
</component>

For this to work I have hacked a bit blaze-layout, but it could be great if someone with more experience with flow-router and blaze-layout could do this properly.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:26 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
vblagomircommented, Oct 15, 2017

@dr-dimitru we might close this for now and when I check it I could reopen when I come back to the project I worked on.

1reaction
vblagomircommented, Jul 26, 2017

I have updated to 1.5.1 and informed a developer of blaze-modules about update (as there are some conflicts yet). Once that is done I will gladly test this, as for the new project I have selected flow-router-extra. Please do not close this for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Free Service Proposal Template - 2022 Legal Sample
This service proposal template can be used by any B2B services provider. It includes sections for company background, testimonials, discussion, and others.
Read more >
Scoped Custom Element Registries · Issue #716
Scoped Custom Element definitions is an oft-requested feature of Web Components. The global registry is a possible source of name collisions ...
Read more >
10 Sales Proposal Templates to Automate the Closing ...
Here are several of the most popular proposal templates our customers use, ... are being rendered, you know all too well about scope...
Read more >
Generic Project Proposal Template
Provide detailed information about proposed procedures, if available, and the scope of work. Include information on activities such as recruiting, training, ...
Read more >
29 Sample Proposal Templates and Design Tips
But without the right proposal template, knowing what your ... within your proposal, too, so your reader can get a full scope of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found