You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is weblorg or templatel issue, feel free to close and move to weblorg if this is not the right place.
I have base.html template and home.html template that extends base.
The route is defined like this:
(weblorg-route
;; route for rendering index page of the blog:site blog
:name"home":input-pattern"posts/*.org":input-aggregate#'weblorg-input-aggregate-all-desc:template"home.html":output"output/index.html":url"/")
home.html just lists posts and their descriptions in the main area.
Inside a base.html I tried to define a sidebar that will contain just links to the posts, by referencing the same post variable, like this:
When generating blog, I get the following error: Template Error: base.html: Variable `posts' not declared
Is there a way in templatel and weblorg to achieve something like this? How can the variable be visible inside base template? Or it needs to be defined globally inside a weblorg-site?
One workaround could be to define an empty sidebar block in base.html, and to override that block inside every template that extends base, but that would be a repetition that I'd like to avoid if possible.
Or maybe wait until include is implemented, but then again, including would still need its route to set variables before including it as a html output.
The text was updated successfully, but these errors were encountered:
Not sure if this is
weblorg
ortemplatel
issue, feel free to close and move toweblorg
if this is not the right place.I have
base.html
template andhome.html
template that extends base.The route is defined like this:
home.html
just lists posts and their descriptions in the main area.Inside a
base.html
I tried to define a sidebar that will contain just links to the posts, by referencing the same post variable, like this:When generating blog, I get the following error:
Template Error: base.html: Variable `posts' not declared
Is there a way in
templatel
andweblorg
to achieve something like this? How can the variable be visible inside base template? Or it needs to be defined globally inside aweblorg-site
?One workaround could be to define an empty sidebar block in
base.html
, and to override that block inside every template that extends base, but that would be a repetition that I'd like to avoid if possible.Or maybe wait until
include
is implemented, but then again, including would still need its route to set variables before including it as a html output.The text was updated successfully, but these errors were encountered: