special galleries: add tests; make special breadcrumb clickable; highlight active special; hide back only
This commit is contained in:
@@ -220,7 +220,16 @@ def render_directory(request, path_text, full_path, special=None):
|
||||
# expose which special is active so templates can highlight it
|
||||
context["active_special"] = special
|
||||
# Override breadcrumbs for special galleries to be a single label
|
||||
context["breadcrumbs"] = [{"label": context["special_name"], "path": None}]
|
||||
# and make it link to the special gallery root so templates can show
|
||||
# it as an active, clickable breadcrumb.
|
||||
from .specials import special_root_url
|
||||
|
||||
context["breadcrumbs"] = [
|
||||
{
|
||||
"label": context["special_name"],
|
||||
"path": special_root_url(special, query_state),
|
||||
}
|
||||
]
|
||||
# Hide the search box (templates use `is_special` to decide)
|
||||
context["search_text"] = ""
|
||||
context["search_action_url"] = ""
|
||||
|
||||
Reference in New Issue
Block a user