You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the current design of things it's only possible to specify one single view for a pagelet. This view in combination with an optional error view is then also send to the client. If your client code needs additional templates to upgrade the graceful degraded content it needs to find it's own solutions for this (Or if you're using multiple React components to render a single pagelet these will all require addition processing as they don't have templates). The solution for this is to allow the view to be a directory with template files.
By default we could either use view.ext or index.ext for the main template and have all other templates be made available using the pagelet.template method where the first argument of this method will be the base name of the template and it would return the given template and or call the template method with the supplied data as second argument (which has yet to be decided).
Sounds like a good plan, I'd go for index.ext just to follow the same analogy as with index.js, Would it be good to specify a third optional argument as extension, cause I could see people mixing .jsx with handlebars or something. Also I think we can default to __dirname in pagelets
In the current design of things it's only possible to specify one single view for a pagelet. This view in combination with an optional
error
view is then also send to the client. If your client code needs additional templates to upgrade the graceful degraded content it needs to find it's own solutions for this (Or if you're using multiple React components to render a single pagelet these will all require addition processing as they don't have templates). The solution for this is to allow theview
to be a directory with template files.By default we could either use view.ext or index.ext for the main template and have all other templates be made available using the
pagelet.template
method where the first argument of this method will be the base name of the template and it would return the given template and or call the template method with the supplied data as second argument (which has yet to be decided).The text was updated successfully, but these errors were encountered: