Cli-microsoft365: Update 'spo page clientsidewebpart add' command capabilities

Created on 2 Jan 2019  路  11Comments  路  Source: pnp/cli-microsoft365

Summary

Current behavior

Currently, with the spo page clientsidewebpart add command, you can :

  • [x] Add a Client Side Web Part to a SharePoint page only if this you have at least one section

If no section is existing on the targeted page, you will have an error that say "no section existing"

Additional behavior

  • [ ] Update existing page and add a section if not exist

To Do

  • [ ] Update command from solution
  • [ ] Update documentation of usage (MkDocs)
  • [ ] Validate cmdlet usage
  • [ ] Validate Unit test
enhancement work in progress

All 11 comments

Sounds like a good idea to add some convenience to using the method. Have you compared how this works in PnP Sites Core/PnP PowerShell? Which type of section is auto-added if necessary?

I had a doubt but after verification, with the following cmdlet:

Add-PnPClientSideWebPart -Page "Home" -Component "MyWebPart"

in fact, when you add a Client Side WebPart to an empty page (without section) the cmdlet create a default section if not exist and add Web Part.

Default section = 1 column?

Yes

Hey @Laul0 are you still working on this?

I have to finish my spec for spo list view field add and I'll work on it

Hey @Laul0, did you have a chance to pick this one up or shall we let others help out?

Hi @waldekmastykarz, I'm finishing the mail send cmdlet first and I'll work on it.
Sorry for the delay, it is a period of holiday and family.

However, if someone else want to work on it, to be quicker, he is welcome

No problem. I'll set this command as available for picking and you can always take it back when you have time and it's still available.

Hi @waldekmastykarz, can I pick this up?

Of course! I appreciate your help 馃憦

Was this page helpful?
0 / 5 - 0 ratings