Is there any way to have a template inherit another template? I’m not using Rails.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No, you can’t inherit an erb template – it isn’t a class. It is just a file.
EDIT:
According to @Dan’s comment, I took a look on Django template inheritance and it looks very similar to Rails
content_for. However I don’t know how to use it outside of Rails. Take a look here at points 3.2 and 3.3, and here.