arisonu123
arisonu123

Reputation: 369

Is it possible to have two links at the same level as the main/index page in doxygen

I'm new to doxygen and I'm not sure if it is possible but I would like to have some links in my tree hierarchy nav view at the same level as the main/index page and not as subpages of the main page. Thanks for the help

Upvotes: 1

Views: 400

Answers (1)

Patrick Kelly
Patrick Kelly

Reputation: 1381

Is it possible? Yes.

Is it automated and easy? No.

The most involved and difficult method is to start with the doxygen mechanism for custom headers, footers, and stylesheet files, and build a completely customized menu system. That can be a tall order if you don't know a lot about HTML/CSS. You will need to provide custom pieces for every bit of menu design you want to include. Start reading the basics at doxygen's Customizing the output page if you want to head down that road.

The other option is to tweak the doxygen menu after it has been generated. It's a manual step that you will need to redo every time you build the documentation. But all it requires is to modify the doxygen-generated navtreedata.js file to make the changes you want. The file has the following structure (this is an example, probably not identical to yours):

var NAVTREE =
[
  [ "Utility Library", "index.html", [
    [ "Main Page", "index.html", null ],
    [ "Classes", "annotated.html", [
      [ "Class List", "annotated.html", "annotated_dup" ],
      [ "Class Hierarchy", "hierarchy.html", "hierarchy" ],
      [ "Class Members", "functions.html", [
        [ "All", "functions.html", null ],
        [ "Functions", "functions_func.html", null ]
      ] ],
      [ "Class Index", "classes.html", null ]
    ] ],
    [ "Files", null, [
      [ "File List", "files.html", "files" ]
    ] ],
    [ "Examples", "examples.html", "examples" ]
  ] ]
];

var NAVTREEINDEX =
[
".html"
];

var SYNCONMSG = 'click to disable panel synchronisation';
var SYNCOFFMSG = 'click to enable panel synchronisation';

Here you can change the navigation, as I have added the "SECOND LEVEL MENU ENTRY" item below. And you can obviously provide child pages, etc., as you see fit.

var NAVTREE =
[
  [ "Utility Library", "index.html", [
    [ "Main Page", "index.html", null ],
    [ "Classes", "annotated.html", [
      [ "Class List", "annotated.html", "annotated_dup" ],
      [ "Class Hierarchy", "hierarchy.html", "hierarchy" ],
      [ "Class Members", "functions.html", [
        [ "All", "functions.html", null ],
        [ "Functions", "functions_func.html", null ]
      ] ],
      [ "Class Index", "classes.html", null ]
    ] ],
    [ "Files", null, [
      [ "File List", "files.html", "files" ]
    ] ],
    [ "Examples", "examples.html", "examples" ]
  ] ],

  [ "SECOND LEVEL MENU ENTRY", "sample-file-secondary.html", [
  ] ]

];

var NAVTREEINDEX =
[
".html"
];

var SYNCONMSG = 'click to disable panel synchronisation';
var SYNCOFFMSG = 'click to enable panel synchronisation';

And if you're wanting to modify the top menu bar view, you can do that in a similar way by editing the file menudata.js. Hope this helps!

Upvotes: 1

Related Questions