Skip to content

Commit f3044da

Browse files
committed
Add hidden navigation settings
1 parent c0acf0a commit f3044da

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

etc/config.sample.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
"BNETDocs has to take a brief moment to do some system maintenance. We'll be back shortly."
1212
],
1313
"mobile_site_enabled": true,
14+
"navigation": {
15+
"hide_search_documents": false,
16+
"hide_search_packets": false,
17+
"hide_popular_documents": false,
18+
"hide_popular_packets": false
19+
},
1420
"server_update_job_token": null,
1521
"user_login_disabled": false,
1622
"user_password_pepper": "bnetdocs-INSERTRANDOMVALUEHERE",

src/templates/header.inc.phtml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ if ( isset( Authentication::$user )) {
1919
$_header_staff = null;
2020
}
2121

22+
$_header_navigation_config = Common::$config->bnetdocs->navigation;
23+
2224
if ( !Common::$config->bnetdocs->asset_versioning ) {
2325
$_unique_asset = '';
2426
} else if ( !is_null( VersionInfo::$version->bnetdocs )) {
@@ -121,11 +123,19 @@ $_campaign_vultr = (
121123
<?php } ?>
122124
<a>Documentation</a>
123125
<a href="<?php echo Common::relativeUrlToAbsolute("/document/index"); ?>">Document Index</a>
126+
<?php if (!$_header_navigation_config->hide_search_documents) { ?>
124127
<a href="<?php echo Common::relativeUrlToAbsolute("/document/search"); ?>">Search Documents</a>
128+
<?php } ?>
129+
<?php if (!$_header_navigation_config->hide_popular_documents) { ?>
125130
<a href="<?php echo Common::relativeUrlToAbsolute("/document/popular"); ?>">Popular Documents</a>
131+
<?php } ?>
126132
<a href="<?php echo Common::relativeUrlToAbsolute("/packet/index"); ?>">Packet Index</a>
133+
<?php if (!$_header_navigation_config->hide_search_packets) { ?>
127134
<a href="<?php echo Common::relativeUrlToAbsolute("/packet/search"); ?>">Search Packets</a>
135+
<?php } ?>
136+
<?php if (!$_header_navigation_config->hide_popular_packets) { ?>
128137
<a href="<?php echo Common::relativeUrlToAbsolute("/packet/popular"); ?>">Popular Packets</a>
138+
<?php } ?>
129139
<?php if ($_header_staff) { ?>
130140
<a>Administration</a>
131141
<a href="<?php echo Common::relativeUrlToAbsolute("/document/create"); ?>">Create Document</a>

0 commit comments

Comments
 (0)