Defining two menus with complex entries for one page .md

In the documentation it is clear that I can define several manus in the yaml for my page.md, but it is unclear to me how to define complex menu entries so that I can have my single page show up in two menus called main and masterarticle respectively.

This is what I have and it’s giving me an error ( yaml: line 4: did not find expected ‘,’ or ‘]’ ):

---
title: "Mestarin sanoin 6/2018: Rienaava sota"
menu:
 [main:
  name:  "Mestarin sanoin 6/2018"
  identifier:  "mestarin-sanoin-2018-06"
  parent:  "mestarin-sanoin"],
  
 [masterarticle:
  name:  "Mestarin sanoin 6/2018"
  identifier:  "mestarin-sanoin-2018-06"
  parent:  "2018"]

Any help is greatly appreciated :slight_smile:

Hi,

It is the syntax of your yaml that is wrong. See if this works for you:

---
title: "Mestarin sanoin 6/2018: Rienaava sota"
menu:
  main:
    name:  "Mestarin sanoin 6/2018"
    identifier:  "mestarin-sanoin-2018-06"
    parent:  "mestarin-sanoin"
  
  masterarticle:
    name:  "Mestarin sanoin 6/2018"
    identifier:  "mestarin-sanoin-2018-06"
    parent:  "2018"
---
1 Like

@pointyfar Yup, that worked. Oddly I tried something like that (I thought, lol) but originally it seemed like the second entry merely overrided the first one… so I surely had some glitch originally.

At any rate, your suggestion worked just as it should, thanks!