Closed crapthings closed 12 years ago
I don't understand the question. Could you please elaborate?
maybe something like
Template['personnel/employees'].__.chunk.list
or
Template['personnel/employees'].__.chunk.card
use one template file or separate into mutiple files?
mutiple seems easy
Interesting idea. So, you are trying to use chunks defined in one template in another template? Or, where do you want to refer to these chunks?
Right now, you can include
a template, which also pulls in all defined functions, blocks, and chunks. I think I'd like to know more about your specific use-case.
just like the first comment, maybe there's a way i can put my employees info into gallery style use like
chunk employees_gallery(employee)
li
a
img(src=employee.photo)
|= employee.name
chunk employees_list(employee)
tr
td= employee.name
Yes, this can be done already, I believe. The chunks aren't exposed via the Template
object, but you can still include
a template from another template.
For example:
employeeTable.blade
include "employees"
table
!= Meteor.ui.listChunk(Employees.find(), __.chunk.employees_list)
employeeGallery.blade
include "employees"
ul
!= Meteor.ui.listChunk(Employees.find(), __.chunk.employees_gallery)
Your employees.blade file contains both chunks... just like your previous comment.
Closing this issue for now...
like a different display style with same meteor.collection eg: to display one for list style, one for card style with a switchable button, but put it in one template file.