Picture of Dean Wilson
Menu JSON example
by Dean Wilson - Tuesday, 23 August 2016, 8:41 PM
 

Do you have an example JSON block for creating a menu item rather than a page as the top level. All the examples I can find are for pages rather than menus.

Side Note: It would be really useful to have a reference manual for all the various JSON elements.

 

Thanks

Dean

Picture of Chuck Lorenz
Re: Menu JSON example
by Chuck Lorenz - Tuesday, 23 August 2016, 10:38 PM
 

Hi Dean,

Here's a partial response and rushed due to travel. I invite someone to clarify what I might muddy up. 

To create a submenu, use "type": "menu" (its _id can follow the same pattern you've set for pages). The pages of the submenu (type: page) should reference the submenu's _id as their _parentId.

In lieu of a single json property reference, it is the intent that you would find all legitimate properties explained in the plug-in's examlle.json and readme.

Hope this keeps you moving forward.

Picture of Dean Wilson
Re: Menu JSON example
by Dean Wilson - Wednesday, 24 August 2016, 11:39 AM
 

Hi Chuck.

Thank you for this.

That helps. Can I ask you to expand on that? I'm so stuck and a further explanation would help massively.

I'm trying to follow your instructions here, and this is what I'm doing:

  • I use "_type": "menu" in the ContentsObjects.json 
  • I use "_type": "article" in the Articles.json file , using parent ID of the "menu" in the ContentsObjects.json (NOTE: it doesn't allow me to use "_type: "pages" in the Articles.json)
  • I make sure blocks and components follow suit (using very basic ones, nothing much in them), and I follow suit with the parent IDs to connect everything. 

This is leading me to pages not loading. Further help would be greatly appreciated.

 

Thanks
Dean

 

 

Picture of Dean Wilson
Re: Menu JSON example
by Dean Wilson - Wednesday, 24 August 2016, 12:03 PM
 

Hi again Chuck

Just to say, got it working! I read your message again, and put the menu AND the page in the same contentObjects.json file. 

Thank you so much. 

Regards
Dean