Skip to content

Commit

Permalink
Get-PnPPage now can load pages living in a folder by specifying "fold…
Browse files Browse the repository at this point in the history
…er/page.aspx"
  • Loading branch information
jansenbe committed Apr 15, 2021
1 parent 73c7d23 commit ed24ae8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

### Added

### Changed

- Get-PnPPage now can load pages living in a folder by specifying "folder/page.aspx"

### Contributors

- Bert Jansen [jansenbe]

## [1.5.0]

### Added
Expand Down
3 changes: 2 additions & 1 deletion src/Commands/Base/PipeBinds/PagePipeBind.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ internal IPage GetPage()
var pages = ctx.Web.GetPages(Name);
if (pages != null)
{
var page = pages.FirstOrDefault(p => p.Name.Equals(Name, StringComparison.InvariantCultureIgnoreCase));
// Just grab the first returned page, the filtering was already done in the GetPages() call
var page = pages.FirstOrDefault();

if (page != null)
{
Expand Down

0 comments on commit ed24ae8

Please sign in to comment.