Forum Discussion

john john's avatar
john john
Steel Contributor
Feb 06, 2019

Is it fine to Embed a classic page inside modern pages using the Embded modern web part

I am working on a classic team site collection inside our sharepoint online. and one of the requirement we got from the customer is to have 12 icons and when we click on the icon it will open external web site such as Facebook, twitter, etc. something as follow:-

 

now the built-in modern web parts will not provide any option to do so. So to be able to add these icons inside our modern page. i did these steps:-

1. inside the "Pages" library i created a classic wiki page >> inside the classic page  i added the 12 icons and i add links to the icons, as follow:-

 

2. then inside the modern page i embed the above classic page using the Embed modern web part + iframe. here is the iframe code i use, where i pass "IsDlg=1" to make sure that only the page body will be rendered:-

<iframe width="100%" height="280" src="https://****.sharepoint.com/Pages/Icons.aspx?IsDlg=1"></iframe>

now this appraoch is quite simple and achieved what i am looking for . but can anyone advice on this appraoch?

second question, which is related to my main question. now in our current classic team site i can create classic pages, but when i created a modern communication site collection i do not have the ability to create classic pages, and as a result i am embedding classic pages created inside another site collection.. so is this fine?

2 Replies

  • I would not mix modern and classic pages in the way you are doing...to achieve what you need I would develop (first look at GitHub if someone has already build this) a SPFx WebPart with the funcionality you have been requested for.
    • john john's avatar
      john john
      Steel Contributor

      jcgonzalezmartin wrote:
      I would not mix modern and classic pages in the way you are doing...to achieve what you need I would develop (first look at GitHub if someone has already build this) a SPFx WebPart with the funcionality you have been requested for.

      why you would avoid this? since both pages (classic and modern) are within the same site collection and are sharepoint pages + modern pages have a modern web part to Embed external pages,, and in my case at-least i am embedding sharepoint classic pages. is this correct? i also search the available SPFx and none of them provide a way to have icons with links

Resources