Forum Discussion
Pavel2235
Oct 11, 2023Brass Contributor
Add ClientsideWebpart quick links
Hi! I tried to create a modern page with ClientsideWebparts. const testPage: IClientsidePage = await sp.web.loadClientsidePage('/SitePages/mypage1.aspx');
const quickLinks = ClientsideWebpart....
LeonPavesic
Oct 11, 2023Silver Contributor
Hi Pavel2235,
I have reviewed your question carefully and I believe that the problem is that you are not setting the items property correctly. The items property should be an array of objects, where each object represents a link. Each link object should have the following properties:
- altText: The alt text for the link.
- description: The description for the link.
- id: A unique identifier for the link.
- sourceItem: An object that represents the source item for the link. The sourceItem object should have the following properties:
- fileExtension: The file extension for the source item.
- itemType: The type of the source item.
- progId: The prog ID for the source item.
- url: The URL of the source item.
- thumbnailType: The type of thumbnail to display for the link.
Here is an example of how to set the items property correctly:
items: [
{
altText: "",
description: "",
id: 1,
sourceItem: {
fileExtension: "",
itemType: 2,
progId: "",
url: "https://xvzms.sharepoint.com/"
},
thumbnailType: 3
}
]
Once you have set the items property correctly, you should see the links displayed on your page.
Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.
If the post was useful in other ways, please consider giving it Like.
Kindest regards,
Leon Pavesic
(LinkedIn)