Open pajooh opened 9 years ago
You add add your custom templates via the AdminConfig option; it's in the readme.
In the next phase, I will get rid of that and use this package:
https://github.com/aldeed/meteor-template-extension
Please check out the router.coffee file. You should be able to get all the subscriptions you've given above already. Users, for example, is included.
i've already added template, there is no problem here.
the point here is how to do special things that iron-router can do in waitOn
etc?
like subscribing to a special subscription (sub collection, filters, etc), not all collection entries which can be set via auxCollections
.
Most if not all of the work is already done by the router.coffee file. If you look in the admin_templates.html file, the last template is what you should copy, modify, give a different name and set in the AdminConfig.
sorry, i edited my prev answer after your response
as stated in the readme, templates for a Collection could be customized, why not letting the user customise every router definitions like waitOn, path etc. in my case, the Posts collection needs another collection to be loaded. but i can not use auxCollections because i want to load collection docs partially (subscribing to all via auxCollection is not efficient). i need the full power of iron-router in adminConfig to customize my needs, not just to customize template and data
I understand what you need.
I haven't tried this, but I imagine that you could create a new route with the same path as the one you want to replace.
You should check out the router.coffee file and set the layout to adminLayout. This way, you can hopefully override the route that this package provides.
I can't think of a good way to complete replace the routes. Please let me know if you do.
currently, i'm using the iron-router for routing. my new post route is like this:
could you please show haw can this be converted to post edit template in AdminConfig? i mean, how the
waitOn
and other iron-router api calls can be defined in the new context?