Cannot replace kadira:flow router with ostrio

I have tried to replace kadira with ostrio (suggested by the docs) in this template - https://wrapbootstrap.com/theme/angle-bootstrap-admin-template-WB04HF123

but it showed no error, just blank page instead of template with all the widgets.

It is difficult to debug something when there are no errors (

Is ostrio flow router extra fully compatible with kadira or there are some peculiarities, which require some tweaking during replacement?

Also, what could go wrong when you see blank page? What is the best way to debug such situations?

Looks like you are not rendering the templates properly. Maybe this thread will help: FlowRouter doesn't work as expected!

1 Like

With ostrio:flow-roter the rendering is slightly different, as it does not use BlazeLayout but has it’s own internal this.render method within action. You need to specify the template in which you want to render and this template needs to yield. Let’s say you have the following layout:

<template name="main-render-target">
  <div>...</div> {{!-- some static layout --}}
  <div class="container">
    {{> yield }} {{!-- the dynamic layout --}}
  </div>
  <div>...</div> {{!-- some static layout --}}
</template>

and you want to draw this template into the layout:

<template name="helloTest">
  <h1>hello world</h1>
</template>

Then you need to register a route with the following action callback:

action (params, queryParams) {
  this.render("main-render-target", "helloTest", { params, queryParams })
}

if this is not working (you don’t see anything) then check either for errors or for the the other callbacks in your route:

.whileWaiting() hook
.waitOn() hook
.waitOnResources() hook
.endWaiting() hook
.data() hook
.onNoData() hook
.triggersEnter() hooks
.action() hook
.triggersExit() hooks
2 Likes

Thank you, I will try this. Isn’t there possible to create some meta-router, which would enable everyone to simply configure list of routes, which would then be automatically bonded to any router od choice with minimal ‘manual’ wiring here and there?

Together with ORM this would really empower Meteor.