summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/config.xml8
-rw-r--r--src/util.cpp30
2 files changed, 30 insertions, 8 deletions
diff --git a/src/config.xml b/src/config.xml
index eed486e..89c1422 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -3361,6 +3361,14 @@ remove the intermediate dot files that are used to generate the various graphs.
]]>
</docs>
</option>
+ <option type='bool' id='BREAD_CRUMB_TRAIL' defval='0'>
+ <docs>
+<![CDATA[
+If the \c BREAD_CRUMB_TRAIL tag is set to \c YES then the complete bread crumb
+trail for a page will be displayed rather than just the root group.
+]]>
+ </docs>
+ </option>
<option type='obsolete' id='USE_WINDOWS_ENCODING'/>
<option type='obsolete' id='DETAILS_AT_TOP'/>
diff --git a/src/util.cpp b/src/util.cpp
index 0113e62..2aafaba 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -6349,26 +6349,40 @@ void addRefItem(const QList<ListItemInfo> *sli,
}
}
-void addGroupListToTitle(OutputList &ol,Definition *d)
+bool recursivelyAddGroupListToTitle(OutputList &ol,Definition *d,bool root,bool shouldRecurse)
{
GroupList *groups = d->partOfGroups();
if (groups) // write list of group to which this definition belongs
{
- ol.pushGeneratorState();
- ol.disableAllBut(OutputGenerator::Html);
- ol.writeString("<div class=\"ingroups\">");
+ if (root) {
+ ol.pushGeneratorState();
+ ol.disableAllBut(OutputGenerator::Html);
+ ol.writeString("<div class=\"ingroups\">");
+ }
GroupListIterator gli(*groups);
GroupDef *gd;
- bool first=TRUE;
+ bool first=true;
for (gli.toFirst();(gd=gli.current());++gli)
{
- if (!first) { ol.writeString(" &#124; "); } else first=FALSE;
+ if (shouldRecurse && recursivelyAddGroupListToTitle(ol, gd, false, shouldRecurse)) {
+ ol.writeString(" > ");
+ }
+ if (!first) { ol.writeString(" &#124; "); } else first=FALSE;
ol.writeObjectLink(gd->getReference(),
gd->getOutputFileBase(),0,gd->groupTitle());
}
- ol.writeString("</div>");
- ol.popGeneratorState();
+ if (root) {
+ ol.writeString("</div>");
+ ol.popGeneratorState();
+ }
+ return true;
}
+ return false;
+}
+
+void addGroupListToTitle(OutputList &ol,Definition *d)
+{
+ recursivelyAddGroupListToTitle(ol,d,true,Config_getBool("BREAD_CRUMB_TRAIL"));
}
void filterLatexString(FTextStream &t,const char *str,