diff --git a/taccsite_cms/templates/djangocms_blog/base.html b/taccsite_cms/templates/djangocms_blog/base.html index e3552cc6a..553fa8b0e 100644 --- a/taccsite_cms/templates/djangocms_blog/base.html +++ b/taccsite_cms/templates/djangocms_blog/base.html @@ -23,6 +23,10 @@ {% endif %} +{% block content_assets %} + +{% endblock content_assets %} +
{{ year_path }} {# prints complete match #} + {% endwith %} + + {# given path '.../2022/...', prints matched content #} + {% with year_slug=path|get_url_match:"/(20\d\d)/" %} +
{{ year_slug }}
{# prints match within the (…) #} + {% endwith %} + """ + result = re.search(pattern, path) + + if result: + try: + match = result.group(1) + except IndexError: + match = result[0] + else: + match = False + + return match diff --git a/taccsite_custom b/taccsite_custom index e97a15d89..953354589 160000 --- a/taccsite_custom +++ b/taccsite_custom @@ -1 +1 @@ -Subproject commit e97a15d8963aaa55882c44f9623ccd148abef09d +Subproject commit 953354589d0ecd70ab5a1d6975e7a1c3ef0268ba