Skip to content

Commit

Permalink
Merge branch 'main' into feat/cmd-79-support-new-core-cms-settings-pr…
Browse files Browse the repository at this point in the history
…efix
  • Loading branch information
wesleyboar authored Jul 3, 2024
2 parents 9fa4c04 + 9755984 commit 6192416
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion taccsite_cms/templates/nav_cms_breadcrumbs.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
{# @var className #}
{% load menu_tags %}

<nav class="s-breadcrumbs {{className}}">
{# To adjust style of "disabled" link #}
{# NOTE: Not using `block`, so markup is together for devs in live markup #}
<style>
.s-breadcrumbs a:not([href]) {
opacity: 1;
color: unset;
}
</style>

<nav class="s-breadcrumbs {{className}}" id="cms-breadcrumbs">

{# To support structured data, item* attributes are used #}
{# SEE: https://confluence.tacc.utexas.edu/x/5yMFDg #}
Expand All @@ -14,3 +23,15 @@
</ol>

</nav>

{# To disable 2nd-level breadcrumb #}
{# NOTE: Not using `block`, so markup is loaded first #}
{# NOTE: Not using `block` nor `type="module"`, so effect is quicker #}
<script>
{# FAQ: Attempts to do this server-side failed cuz useful props are blank #}
{# https://docs.django-cms.org/en/release-3.11.x/reference/navigation.html#properties-of-navigation-nodes-in-templates #}
document
.getElementById('cms-breadcrumbs')
.querySelector('li:nth-of-type(2) > a')
.removeAttribute('href');
</script>

0 comments on commit 6192416

Please sign in to comment.