Generate a restapi page with submenu to navigate different page, no scrolling
Hi all, I'm trying to generate a personal template with mustache. I'm using the start project "docfx-seed-master" to do some test.
I would like to get a page "Api Reference" like this (this is my page now):

without "right affix" / "right menu", i read that it uses <h1-h2-h3....> tag from current document. But have a submenu under every left item, like this: (with different page for heach tag h1-h2-h3)

For example:
Left Menu Search....
PetStoreAPI - AddPet - UpdatePet - FindPetsByTags - DeletePet ........ ContactsAPI - Get Contacts - Get Contact By Id .........
For heach submenu (Addpet, UpdatePet etc ...) a different page. I studied so much the system for creating a custom template, but it's really difficult. I hope that someone could help me please, I don't know how to solve alone. Kind regards, Vito
Hi @vverrastro , in current design (sample page), left navigation is to navigate to different pages, right navigation is to navigate to in-page h1-h3 tags. Do you mean to move h1-h3 tag navigation from right affix into left affix?
Hi @hellosnow, yes. But I need to create a different page for heach item menu (h1.h2.h3) instead of scrooling.
Is it expected to split member level pages to separate pages, so that each method is in one page (it's supported for managed reference, rest api doesn't support it yet)? If yes, nuget package memberpage may help you on this, source code is here SplitClassPageToMemberLevel.cs. @vicancy would know more details.
Hi @hellosnow, I tested the package that you have shown me. It works good with api documentation, but in Restapi it not works, i don't know why. Here the exemple: (Without memberpage - API Documentation)

(With memberpage package - API Documentation)

This is my Restapi page with no package memberpage effect

Yes Rest doesn't support split by operations now, one swagger file is generated as one html currently...
I understood. You were kind and helpful. Thank you.
@vverrastro we will consider to add such option for REST to be more flexible, will let you know our schedule if it's decided.
Great! I will follow all the news about this.
@vverrastro we plan to split the rest api into operation groups by Tag rule first, take this rest page as an example, the overall API will be grouped into Pet, Store,Users and Other Apis(not grouped), and we will modify these 4 tags into left navigation, the inner operations such as addPet and updatePet will be kept in right navigation. Is this scenario meet your requirement?
Hi @hellosnow, in your exemple I don't see any change change from the initial sample project. My scenario is (like api documentation with memberspage package):
Left Navigation exemple: (Without big one page with scroll)
- Petstore Api AddPet (single page) DeletePet (single page) GetPet (single page)
Now if I click on petstoreapi, in navigation bar I have: restapi/petstore.html In my scenario could be restapi/petstore/addpet.html etc
Maybe I dont' understeand your plan :)
@vverrastro I didn't update the referred rest page, just to provide some information. If you read the right navigation of the this rest page , you'll find all operations are not in flat, but group by tags, refer to docfx document Tags to organize the sections of apis.
For splitting the pages, we will move tags group in left toc, and keep each operation inside the tag group in right navigation in first step.
We deliver the split logic via #1827 and #1872 , and the documentation #1895 . Please have a try on it:
- With
rest.tagpageplugin enabled, operations with the same tag are grouped into one page. - With
rest.operationpageplugin enabled, each operation is splitted into single page. - With both
rest.tagpageandrest.operationpageplugins enabled, the REST model will be splitted to tag level first, then split to operation level.
Refer Plugins dashboard for more details (It will be refreshed after docfx version upgraded)