- Issue created by @tsurvuli
- Status changed to Closed: cannot reproduce
7 months ago 9:10pm 30 May 2024 - πΊπΈUnited States jcandan
Following the usage docs, I am able to get this to work with the following:
Note: The
node.html.twig
file doesn't provide any twig-blocks to hook into. So, I ended up adding the markup via a preprocess hook:function MYMODULE_preprocess_node(&$variables) { // Specify the wrapper class. $variables['content_attributes']['class'] = 'usa-in-page-nav-container'; // Prepend the content with the sibling aside element. // Specify the appropriate data-main-content-selector. $variables['content']['#prefix'] = '<aside class="usa-in-page-nav" data-title-text="On this page" data-title-heading-level="h4" data-scroll-offset="0" data-root-margin="0px 0px 0px 0px" data-threshold="1" data-main-content-selector=".block-system-main-block" ></aside>'; }
For future consideration, the community might be able to help better if you provide more detail about how to reproduce your issue.
Hope this helps!