Skip to content

Commit

Permalink
Version 2 changes, include existing nav
Browse files Browse the repository at this point in the history
  • Loading branch information
Beau Cameron committed Apr 17, 2018
2 parents a01fedd + 1a5ad62 commit c4803cd
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 27 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# SharePoint-Framework
# SharePoint-Framework
This is a collection of samples SharePoint Framework customizations for use with Office 365.
69 changes: 50 additions & 19 deletions react-hubsite-securitytrim-navbar/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,57 @@
## react-hubsite-securitytrim-navbar
# react-hubsite-securitytrim-navbar

This is where you include your WebPart documentation.
## Summary

### Building the code
Application Customizer which uses the SharePoint Search API and the new Hub site REST API to build out security trimmed navigation within hub sites. This application customizer will hide the default hub site navigation.

```bash
git clone the repo
npm i
npm i -g gulp
gulp
```
![The Hub Site Nav Bar](https://www.aerieconsulting.com/hs-fs/hubfs/HubNavSite.png?t=1522675516566&width=2924&height=1349&name=HubNavSite.png)

## Solution

Solution|Author(s)
--------|---------
react-hubsite-securitytrim-navbar|Beau Cameron (MVP, [@Beau__Cameron](https://twitter.com/Beau__Cameron))

## Version history

Version|Date|Comments
-------|----|--------
1.0.0|April 1, 2018|Initial release

## Disclaimer

**THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**

This package produces the following:
---

## Prerequisites

* Office 365 Developer tenant with a modern site collection w/ atleast one hub site enabled

## Build options

* clone this repo
* in the command line run
* `npm i`
* `gulp serve --nobrowser`
* open a modern site that exists within a hub site
* append the following query string parameters to the URL
* change "NavHeading" to be equal to the text of the root node. For example, "Sites"

```text
?loadSPFX=true&debugManifestsFile=https://localhost:4321/temp/manifests.js&customActions={"1859a5f8-d2fc-4c55-91ba-a097edf6da00":{"location":"ClientSideExtension.ApplicationCustomizer","properties":{"NavHeading":"Sites"}}}
```

## Deployment

* lib/* - intermediate-stage commonjs build artifacts
* dist/* - the bundled script, along with other resources
* deploy/* - all resources which should be uploaded to a CDN.
In order to deploy to a real environment
* update the _cdnBasePath_ property in the write-manifests.json file with the URL to your CDN
* bundle and package the solution by executing the following commands in the command line:
* `gulp bundle --ship`
* `gulp package-solution --ship`
* upload the content of the ./temp/deploy subfolder of the sample root folder into your CDN
* add the reactHubsiteNavbar.appkg to the "Apps for SharePoint" library of the AppCatalog in your tenant. You may find the .appkg file in the project rootfolder/sharepoint/solution

### Build options
## Features

gulp clean - TODO
gulp test - TODO
gulp serve - TODO
gulp bundle - TODO
gulp package-solution - TODO
This project uses a SharePoint Framework Application Customizer, Hub Site API and SharePoint Search API
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,9 @@ export class SPSearchService {
Navigation:[]
});
}

//filter out root hub?
/*
if (site.Cells[5].Value != ID) {
}*/
}
return result;
});

}
}
}

0 comments on commit c4803cd

Please sign in to comment.