Skip to content

Can't seem to use template inheritance from Tera. #1892

Discussion options

You must be logged in to vote

parsing errors: Template 'navbar.html.tera' is inheriting from 'base', which doesn't exist or isn't loaded.

This error is showing because Tera::new() and rocket_dyn_templates use different rules for file extensions. Tera::new() strips one file extension (or none, it seems); rocket_dyn_templates strips two.

(Aside from that, your templates don't seem quite right. extends is used for template inheritance, but this navbar looks like a use case for include instead.)

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@danielyrovas
Comment options

@jebrosen
Comment options

Answer selected by danielyrovas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants