pnp / PnP-Sites-Core

Microsoft 365 Dev PnP Core component (.NET) targeted for increasing developer productivity with CSOM based solutions.
Other
415 stars 642 forks source link

link is missing in quicklink webpart while copying modern page #1973

Closed ParvathySN closed 5 years ago

ParvathySN commented 5 years ago

Link is missing in quick link webpart after copying modern page

jansenbe commented 5 years ago

How did you copy the modern page? Did you copy across site collections?

ParvathySN commented 5 years ago

Yes.Using ClientSidePage AddSection method. If we are using AddSection and Add Controls Method, all sections along with controls will get copied. Only quick link webpart is not working.All the properties (title gets copied except link) Is there any other method to copy modern pages across site collection

ParvathySN commented 5 years ago

How did you copy the modern page? Did you copy across site collections?

Yes.Using ClientSidePage AddControl method.

ParvathySN commented 5 years ago

This is working now.

ParvathySN commented 5 years ago

Solution

  1. Add new section to destination page 2.loop through all controls in source page 3.Add control to sections in destination page 4.Exceptions for the following webparts : Created new webpart & updated the json properties (for urls) a.Image & Image Gallery b. Quicklinks c.Text (if you need to change url)