Add "extends"
See original GitHub issueIt would be really cool to add the possibility to extend other pages and complete blocks like this :
Base.ejs :
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%- block title %><%- endblock %></title>
<%- block stylesheets %><%- endblock %>
<%- block javascripts %><%- endblock %>
</head>
<body>
<%- block body %><%- endblock %>
</body>
</html>
HomePage.ejs
<%- extends "Base.ejs" %>
<%- block title "EJS" %>
<%- block body %>
<h1>Hello EJS !</h1>
<%- endblock %>
Thank you for your attention !
Issue Analytics
- State:
- Created 3 years ago
- Reactions:43
- Comments:5
Top Results From Across the Web
How can I add to List<? extends Number> data structures?
Sorry, but you can't. The wildcard declaration of List<? extends Number> foo3 means that the variable foo3 can hold any value from a...
Read more >extends - JavaScript - MDN Web Docs - Mozilla
The extends keyword is used in class declarations or class expressions to create a class that is a child of another class.
Read more >Sass: @extend
When one class extends another, Sass styles all elements that match the extender as though they also match the class being extended. When...
Read more >Extending Classes | Think Java | Trinket
Rather than add every possible feature to CardCollection , we can use inheritance to define subclasses. A subclass is a class that “extends”...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That’s the inverse of the request; it’s not the same thing at all.
On several pages, it won’t be less code. Moreover it forces to pass the title variable through another page.
For your example, it’s not relevant to do this for scripts and stylesheets.
You are trying to argue for a pointless matter, it won’t change anything for you if this feature is added.
In short, stop polluting this issue with a different feature, I’m waiting for an answer from @mde !