Issue Number | 5079 |
---|---|
Summary | Generate "In This Section" block for summaries |
Created | 2021-12-17 09:36:55 |
Issue Type | Improvement |
Submitted By | Kline, Bob (NIH/NCI) [C] |
Assigned To | Kline, Bob (NIH/NCI) [C] |
Status | Closed |
Resolved | 2022-01-20 13:46:51 |
Resolution | Fixed |
Path | /home/bkline/backups/jira/ocecdr/issue.307120 |
Currently the "In This Section" block for PDQ summaries on cancer.gov is generated by JavaScript running in the visitor's browser after the page is fetched. This practice has been found to have a negative affect on our SEO scores, so we want to move the generation of those blocks further upstream, creating them before the summaries are sent to Drupal. We considered three options:
Add code to the existing XSL/T filter
Add a new post-processing filter
Add the blocks in cdrpub.py
The drawback of the first option is that not all of the information needed by the logic to build the blocks is available yet, so the added code would have to duplicate some of the work already being done.
The drawback of the second option is that it leaves us with another filter to manage and invoke.
So after some discussion Volker and I decided that the third option would be preferable to the other two.
The brief for this ticket is to duplicate the logic implemented by
the existing JavaScript code (except for the bug in that code which
mangles the attributes of the nav
element it creates) when
the JSON is being assembled by cdrpub.py for the CMS, and deploy the
modified code once the comparable JavaScript code has been removed from
Drupal.
This has been implemented, but the new code cannot be enabled until https://github.com/NCIOCPL/cgov-digital-platform/issues/3260 is ready (otherwise we'd have duplicate "In This Section" blocks).
This is in place on CDR DEV.
Verified on DEV. Thanks!
The software changes have been moved to production.
Closing ticket.
Elapsed: 0:00:00.001331