Stream: shorthand
Topic: sub-menu detected when it's not
Jean Duteau (Aug 24 2020 at 20:34):
I want to include a link to US Core in my menu so I'm doing this:
menu:
Table of Contents: toc.html
PAS Specification:
PAS Home Page: index.html
Use Cases and Overview: usecases.html
Technical Background: background.html
HIPAA Regulations: regulations.html
Formal Specification: specification.html
Downloads: downloads.html
Credits: credits.html
FHIR Artifacts:
Artifacts Overview: fhirArtifacts.html
PAS-specific Artifacts: artifacts.html
US Core: {{site.data.fhir.ver.hl7_fhir_us_core}}
Base Specs:
"FHIR R4 Spec ": new-tab external {{site.data.fhir.path}}index.html
History: http://hl7.org/fhir/us/davinci-pas/history.html
I'm getting an error on the US Core line: "The US Core menu item specifies a sub-menu. The IG template currently only supports two levels of menus. The sub-menu for US Core is included in the menu.xml file but it will not be rendered in the IG."
But this isn't a sub-menu, it's just a liquid link to the US Core. I tried adding index.html at the end like in the FHIR R4 Spec, but that gave me a YAML error. Do I need to escape this line better?
Chris Moesel (Aug 24 2020 at 20:41):
I expect that the YAML parser is interpreting the surrounding {
}
as a Javascript object -- which makes SUSHI think it is a sub-menu. Can you try this:
Chris Moesel (Aug 24 2020 at 20:41):
US Core: "{{site.data.fhir.ver.hl7_fhir_us_core}}"
Jean Duteau (Aug 24 2020 at 20:42):
Yep, that appears to have worked.
Jean Duteau (Aug 24 2020 at 20:57):
spoke too soon - it doesn't raise the SUSHI warning, but it results in a menu.xml that has ...href=""{{blah blah}}"", i.e. the " characters are kept
Jean Duteau (Aug 24 2020 at 20:59):
i got around this by putting external in front of the liquid variable: US Core: external {{blah}}
Chris Moesel (Aug 24 2020 at 22:21):
hrm... there must be another way... I've also noticed lately that some of the templates now auto-detect external links and apply the external icon automatically -- so when you use external
in the menu, you might see the external icon double-applied. :-/
Jean Duteau (Aug 24 2020 at 23:01):
yeah, I saw that, so I removed external and just put new-tab, which I suspect might also be auto-detected.
Eric Haas (Aug 25 2020 at 01:00):
for YAML use this:
US Core: >-
{{site.data.fhir.ver.hl7_fhir_us_core}}
will preserve the {{}}
(at least with my parser it does.)
but the bigger question is why do you want your menu leading away from your guide. I hate that.?
Last updated: Apr 12 2022 at 19:14 UTC