Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make master page #5

Open
Shedward opened this issue May 1, 2024 · 0 comments
Open

Make master page #5

Shedward opened this issue May 1, 2024 · 0 comments

Comments

@Shedward
Copy link
Owner

Shedward commented May 1, 2024

Make master page

https://docs.vapor.codes/leaf/overview/#extending-templates

child.leaf

#extend("master"):
    #export("body"):
        <p>Welcome to Vapor!</p>
    #endexport
#endextend

master.leaf

<html>
    <head>
        <title>#(title)</title>
    </head>
    <body>#import("body")</body>
</html>

Originally posted by @Shedward in #3 (comment)

@Shedward Shedward changed the title ## Make master page Make master page May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant