Skip to content

Conversation

@danielkhan
Copy link
Contributor

This adds the option to specify a property layout when rendering ejs, dot, handlebar and eta templates.
Providing a layout globally or on render is mutually exclusive and an error will be thrown if both are set.

Docs look as if they could use a bit more structure and will be proposed in a separate PR.

Usage:

return reply.view('home', {}, { layout: './layouts/default' });

closes #276

Checklist

@danielkhan danielkhan mentioned this pull request Nov 28, 2021
2 tasks
Copy link
Member

@climba03003 climba03003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the extra devDependencies, we use standard only.

@danielkhan
Copy link
Contributor Author

Please remove the extra devDependencies, we use standard only.

This was copied from fastify and introduced and approved by @mcollina in #277.
Just making sure before rebasing this branch.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with a question

@climba03003
Copy link
Member

Please remove the extra devDependencies, we use standard only.

This was copied from fastify and introduced and approved by @mcollina in #277. Just making sure before rebasing this branch.

Does it means that the changes should be on #277 and it should not be in here?

@danielkhan
Copy link
Contributor Author

Does it means that the changes should be on #277 and it should not be in here?

This feature branch is a fork of the branch containing #277. That's why I can easily rebase this one if these changes are unwanted.

@danielkhan
Copy link
Contributor Author

Please remove the extra devDependencies, we use standard only.

This should now be all cleaned up

@climba03003
Copy link
Member

Please remove the extra devDependencies, we use standard only.

This should now be all cleaned up

I think this PR can be closed because all your works is merged on #284
You can see that https://github.com/fastify/point-of-view/pull/278/files has no file changes

@danielkhan danielkhan closed this Dec 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow specifying the layout on render

3 participants