This project has moved and is read-only. For the latest updates, please go here.

How to customize website TOC?

Topics: Developer Forum
Jul 30, 2011 at 10:35 PM
Edited Jul 30, 2011 at 10:42 PM



I know I can edit (or even place to the root folder of the project, a new one) TOC.css to customize the style of the website TOC, but I'm actually more interested to know how the contents of {@HtmlTOC} are generated.
What I want to do is:

* Add icons for each node representing its type.

* Sort by Type first, then by name.


Thank You,

Aug 2, 2011 at 8:26 PM

It depends on what you mean by "type".  If you mean member type such as field, property, method, etc., you may be able to do that based on the ID since each starts with a unique prefix ("F:" for fields, "P:" for properties, etc).  However, they're already grouped into categories like that already so I'm not sure what that changes.  "{@HtmlTOC}" is generated by code for the Index.htm page so you'd have to modify the SHFB source to add different icons.  For Index.aspx, you could modify it directly to return the appropriate TOC content.  However, it's probably more complicated than that as I don't think the member ID value carries over into the TOC information, just the filename ID.  As for the TOC order itself, you'd probably have to modify the Sandcastle XSL transformation that generates the intermediate TOC file off of which the other TOC files are generated.