Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix BannerImageUrl to use sphost only since siteid, webid are given as parameter #439

Merged
merged 1 commit into from
May 11, 2021

Conversation

czullu
Copy link

@czullu czullu commented May 11, 2021

Fix BannerImageUrl to use sphost only since siteid, webid are given as parameters.

First i did want to fix on Extract in pnpframework, but since ServerRelativeImageUrl is referred to at some many places i came back here to fix it on provision.

The Property in PnP-XML on ClientSidePage->Header would look like this.
ServerRelativeImageUrl="{site}/SiteAssets/SitePages/testedtec-Neuigkeitenvorlage/33700-20931-Startseite_testedtec365.jpg"
will be set like this:
$"{PnPContext.Uri.Scheme}://{PnPContext.Uri.DnsSafeHost}/_layouts/15/getpreview.ashx?guidSite={PnPContext.Site.Id}&guidWeb={PnPContext.Web.Id}&guidFile={pageHeader.HeaderImageId}"

@jansenbe jansenbe self-assigned this May 11, 2021
@jansenbe jansenbe added the area: pages API 📄 Working with modern pages label May 11, 2021
jansenbe added a commit that referenced this pull request May 11, 2021
@jansenbe jansenbe merged commit c70367d into pnp:dev May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: pages API 📄 Working with modern pages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants