app/html/shared/layout.html was rendering the sidebar once to determine which class to use on the main div, once to determine whether to create the sidebar div, and a third time to fill the sidebar div. This is a lot of extra work, especially for the pages which have top posts and recent activity on the sidebar.
Add wheezy's CodeExtension to allow arbitrary Python code in the templates, and use that to store the rendered sidebar in a variable.
app/html/shared/layout.html
was rendering the sidebar once to determine which class to use on the maindiv
, once to determine whether to create the sidebardiv
, and a third time to fill the sidebardiv
. This is a lot of extra work, especially for the pages which have top posts and recent activity on the sidebar.Add wheezy's
CodeExtension
to allow arbitrary Python code in the templates, and use that to store the rendered sidebar in a variable.